cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

The requested operation is invalid. Server Response: A value must be provided for item. People Field

I have a new form. In order to save time I auto populate the fields for the person name and supervisor (both are SharePoint lists People or Group fields). In order to do so I selected the Data Card which is responsible for Employees Name and in default value I put the following formula:

Office365Users.MyProfile()

In the supervisors field I did the same thing and put the following formula:

Office365Users.Manager(Office365Users.MyProfile().UserPrincipalName)

It works and displays the employee name correctly as well as the supervisors name correctly. However it seems that it does not bind the Person item correctly to the field. Because if I launch the PowerApp and try to create a new record without changing the Employee field or Supervisor field I get the following error:

The requested operation is invalid. Server Response: A value must be provided for item.

However if I manually enter Employee Name and select from the drop down list and do the same for Supervisor it works as expected. So it seems that when I put the default value even though it is a People object it does not bind it correctly.

 

It is not a huge issue I can just make every employee manually find their name and their supervisors name, however it would be very nice if I could make this automation work. Has anyone had a similar issue and found a way to fix it? Thanks!

 

Here is the pic of the data card:

issue.png

 

 

If I manually type into the field and then select an option from suggested options there is no error:

issue2.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

Re: The requested operation is invalid. Server Response: A value must be provided for item. People F

Hi @Anonymous,

 

I think the issue here should be related with Record mis-match.

SharePoint lookup fields (Like Choice, Lookup, and Person or group type) is considered as record type under PowerApps, you should be able to find the proper record elements by checking the lookup field advanced options:

It should be the following:

 {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",

             Claims:"i:0#.f|membership|michael@wiXXXX.onmicrosoft.com",

             Department:"",

             DisplayName:"Michael Shao",

             Email:"Michael@wiXXXX.onmicrosoft.com",

             JobTitle:"",

             Picture:""

             }

The Office365user.MyProfie() would give the following record elements:

Office365Users.MyProfile().Department
Office365Users.MyProfile().DisplayName
Office365Users.MyProfile().GivenName
Office365Users.MyProfile().Id
Office365Users.MyProfile().JobTitle
Office365Users.MyProfile().Mail
Office365Users.MyProfile().MailNickname
Office365Users.MyProfile().Surname
Office365Users.MyProfile().TelephoneNumber
Office365Users.MyProfile().UserPrincipalName
Office365Users.MyProfile().AccountEnabled

 

We could change the Default property with the corresponding record (People field), then replace the data with the following:

 

{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",

             Claims:Concatenate("i:0#.f|membership|",Office365Users.MyProfile().Mail),

             Department:Office365Users.MyProfile().Department,

             DisplayName:Office365Users.MyProfile().DisplayName,

             Email:Office365Users.MyProfile().Mail,

             JobTitle:Office365Users.MyProfile().JobTitle,

             Picture:""

             }

68.PNG

Tested from my side, the corresponding user would be added without selection.

Let me know if this works in your side.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Highlighted
Community Support Team
Community Support Team

Re: The requested operation is invalid. Server Response: A value must be provided for item. People F

Hi @Anonymous,

 

I think the issue here should be related with Record mis-match.

SharePoint lookup fields (Like Choice, Lookup, and Person or group type) is considered as record type under PowerApps, you should be able to find the proper record elements by checking the lookup field advanced options:

It should be the following:

 {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",

             Claims:"i:0#.f|membership|michael@wiXXXX.onmicrosoft.com",

             Department:"",

             DisplayName:"Michael Shao",

             Email:"Michael@wiXXXX.onmicrosoft.com",

             JobTitle:"",

             Picture:""

             }

The Office365user.MyProfie() would give the following record elements:

Office365Users.MyProfile().Department
Office365Users.MyProfile().DisplayName
Office365Users.MyProfile().GivenName
Office365Users.MyProfile().Id
Office365Users.MyProfile().JobTitle
Office365Users.MyProfile().Mail
Office365Users.MyProfile().MailNickname
Office365Users.MyProfile().Surname
Office365Users.MyProfile().TelephoneNumber
Office365Users.MyProfile().UserPrincipalName
Office365Users.MyProfile().AccountEnabled

 

We could change the Default property with the corresponding record (People field), then replace the data with the following:

 

{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",

             Claims:Concatenate("i:0#.f|membership|",Office365Users.MyProfile().Mail),

             Department:Office365Users.MyProfile().Department,

             DisplayName:Office365Users.MyProfile().DisplayName,

             Email:Office365Users.MyProfile().Mail,

             JobTitle:Office365Users.MyProfile().JobTitle,

             Picture:""

             }

68.PNG

Tested from my side, the corresponding user would be added without selection.

Let me know if this works in your side.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

Re: The requested operation is invalid. Server Response: A value must be provided for item. People F

Thanks Michael. It works as expected!

Daemagor
Level: Powered On

Re: The requested operation is invalid. Server Response: A value must be provided for item. People F

Hi @v-micsh-msft,

 

I have ran into the same problem, I wanted to have my field auto-fill the person who is using the powerapp form. I have used OData function inside the default option and what I get in return is  "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser". What am I doing wrong?

 

 

Capture.PNG

Anonymous
Not applicable

Re: The requested operation is invalid. Server Response: A value must be provided for item. People F

hi @Daemagor

 

You are doing everything correctly. You have to choose which data you want the field to show since the record contains several different values.

 

To change which value it displays:

1. Select the card

2. Select Advanced in the right tool box, under Data click more options.

3. Change Value from @odata.type o Display Name

 

1.png

 

2.png

Daemagor
Level: Powered On

Re: The requested operation is invalid. Server Response: A value must be provided for item. People F

@Anonymous,

 

That works, perfect, thank you so much!

MARIOROSSIBEAN
Level: Powered On

Re: The requested operation is invalid. Server Response: A value must be provided for item. People F

hi,

 

I have the same issue but by using CDS. please,What can i do?

 

Thanks

Andi

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,426)