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

PowerApps: Patch person column in Power apps

Dears, 
I'm new to PowerApps and I'm creating an scheduling app with SPList as my data source.

I'd like to choose an employee and Patch this person to my SPList Person column.

In my gallery (Items:
SPList's data source) my TextInput has:

Default:
ThisItem.(column name). DisplayName
OnChange:

Patch(
'Quality evaluator',
Defaults('Quality evaluator'),
{

ThisItem.'First evaluator', {
'@odata.type': "#microsoft.azure.connectors.sharepoint.splistexpandedreference",
Claims:txt.input.eval.Selected.Claims,
Department: txt.input.eval.Selected.Department,
DisplayName: txt.input.eval.Selected.DisplayName,
Email: txt.input.eval.Selected.Mail,
JobTitle: txt.input.eval.Selected.Jobtitle,
Picture: txt.input.eval.Selected.Picture
}
}
)

 

I'm getting the following error:

Ardions_1-1611840871154.png

 

I don't understand how to fix. Anyone can help?
Thanks

 

1 REPLY 1
RandyHayes
Super User
Super User

@Anonymous 

Office365 user records are different than SharePoint user records.  

Be that as it may, it appears that your txt.input.eval control has an items property that is based on the SharePoint record.  In that case, please consider changing your Formula to the following:

Patch(
    'Quality evaluator',
    Defaults('Quality evaluator'),
    {
    'First evaluator': txt.input.eval.Selected
    }
)

If you are assigning  a SharePoint user record to a Person column, you don't need to specify the record columns.

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (2,447)