cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ardions
Helper I
Helper I

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 III
Super User III

@Ardions 

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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,775)