cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RichardB
Level: Powered On

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
Power Apps Staff sarafankit
Power Apps Staff

Re: Update SharePoint Person type column using SubmitForm function

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
Power Apps Staff sarafankit
Power Apps Staff

Re: Update SharePoint Person type column using SubmitForm function

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

RichardB
Level: Powered On

Re: Update SharePoint Person type column using SubmitForm function

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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

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