web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Form does not submit w...
Power Apps
Answered

Form does not submit with Default Values

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Having a strange issue with a form i'm working on at the moment. My datasource is a SharePoint list. Right now, I'm working with just one field ("Line Manager") which is a person field. On my form I have set the datacard's default value to the following:

If(FormCreateNewRequest.Mode = New, Office365Users.Manager(Office365Users.MyProfile().Mail), ThisItem.Line_x0020_Manager)

When I navigate to the form and submit it using the SubmitForm method, I receive the error below. I've set the SharePoint list to have no required fields, but the error persists. However, if I change the value of this field (i.e. Type the name of someone else and select them) the form will submit succesfully.

powerappsformerror.PNG

 

I have tried to work around this bug by instead getting the value of this field and then patching the record manually:

Patch('IT Equipment Requests', Defaults('IT Equipment Requests'),
	{
		Line_x0020_Manager: DataCardLineManagerInput.Selected
 }
)

Unfortunately this won't work as the following error is detected in the Patch function:

 

powerappsformerror2.PNG

 

Soo my question now is, how do i correctly emulate setting a "Person" field using Patch, or is there something I'm doing wrong with setting the Default property of that field?

Categories:
I have the same question (0)
  • Meneghino Profile Picture
    6,949 on at

    Hi @Anonymous

    In order to patch to a person type field you need to patch a record, not a value.  That record needs to include the correct @odata.type field value.  Basically the approach is the same as in this post:

    https://powerusers.microsoft.com/t5/PowerApps-Forum/Solved-patching-to-SharePoint-choice-and-lookup-type-columns/m-p/21561

     

    But the record fields will be different, and I think the odata value is also different, but I have not looked at it in a while.

     

    Please come back if you have trouble figuring it out.

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Meneghino, thanks for the tip!

     

    I had a closer look at how Powerapps interprets a Person field by creating a collection from my list data. Managed to find the correct OData type there.

     

    The following code appears to work to manually patch a person field, allowing us to use the search ability on an Edit Form but without using the SubmitForm method. *note, i changed the column to be named "approver" for other reasons

     

    Patch('IT Equipment Requests', Defaults('IT Equipment Requests'),
    	{
    		Approver : {Claims: DataCardValue1.Selected.Claims, Department: DataCardValue1.Selected.Department, DisplayName: DataCardValue1.Selected.DisplayName, Email: DataCardValue1.Selected.Email, JobTitle: DataCardValue1.Selected.JobTitle, Picture: DataCardValue1.Selected.Picture, '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser"}
    	}
    )

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard