cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RichardB
Advocate III
Advocate III

Update SharePoint Person type column using SubmitForm function

Hello PowerApps Community

 

I have an Edit Form called EditForm1, linked to a SharePoint list and the form has 3 data cards

 

One data card is linked to the Title column, one card is linked to a Date/Time column and one is linked to Person type.

The SubmitForm(EditForm1) function is saving changes to the Title column and the Date/Time column, but is not updating the Person column.

 

I understand that SharePoint Person type data types need to be handled differently to other SP column types and I wrapped the updated value into a Context Variable

UpdateContext({ctxApprover:{'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",EmailClaims:"i:0#.f|membership|" & Lower(User().Email),

  Department:"", DisplayName:User().Email,

  Email:User().Email,

  JobTitle:".",

  Picture:"."}})

And then used this Context Variable as the Update property of the Data card, however the existing record is not being overwritten.

 

Does anyone have any success in using this method to update a Person type SharePoint column.

 

For reference I used the approach suggested in this article.

http://www.codeovereasy.com/2017/07/powerapps-set-sharepoint-person-field-to-current-user/

 

cheers Richard

1 ACCEPTED SOLUTION

Accepted Solutions
sarafankit
Power Apps
Power Apps

I think it may be because of couple of issues you have in your update value.

 

Here is what worked for me:

{'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
  Claims:"i:0#.f|membership|" & Lower(User().Email),
  Department:"",

  DisplayName:User().FullName,
  Email:User().Email,
  JobTitle:".",
  Picture:"."}

 

Another thing I did was to directly set the Update property of the data card to this value rather than use a context variable.

View solution in original post

2 REPLIES 2
sarafankit
Power Apps
Power Apps

I think it may be because of couple of issues you have in your update value.

 

Here is what worked for me:

{'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
  Claims:"i:0#.f|membership|" & Lower(User().Email),
  Department:"",

  DisplayName:User().FullName,
  Email:User().Email,
  JobTitle:".",
  Picture:"."}

 

Another thing I did was to directly set the Update property of the data card to this value rather than use a context variable.

Hi Ankit,

 

Thanks for the quick response, I tested your solution and added this directly to the Update property of the data card and it worked beautifully.

 

Great work !

 

cheers

 

Richard

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

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

Users online (4,887)