cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

Patch Person or Group field no longer working in Sharepoint 2016 On-Premise (NOT online)

In Sharepoint 2016 OnPremise - creating a new record via patch function no longer works.

I have testet the same code on Sharepoint ONLINE and here it works. But the code no longer works in Sharepoint OnPremise.

 

I have used this approuch:

 

 

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

 

I have used the above code to patch several Person or Group fields in many apps. And they all stopped working with errors in the Patch command.

 

See example online here:

Article: PowerApps Set SharePoint Person field to Current User

 

Can anyon else confirm that this is no longer working in Sharepoint 2016 On-Premise (NOT online) ?

6 REPLIES 6
Highlighted
Power Apps
Power Apps

Re: Patch Person or Group field no longer working in Sharepoint 2016 On-Premise (NOT online)

Hi @JanLektonen, I just wanted to let you know that I am aware of this issue and have identified the root cause. I am currently looking for a solution.

Highlighted
Power Apps
Power Apps

Re: Patch Person or Group field no longer working in Sharepoint 2016 On-Premise (NOT online)

Hi @JanLektonen,

 

I was able to get the patch working by adding the 'ODataType' property with a value of "Blank()". I have updated your rule value (below) to include the new property.

 

{ 
 '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser", 
  Claims:"i:0#.f|membership|" & Lower(User().Email), 
  Department:"", DisplayName:User().Email, 
  Email:User().Email, 
  JobTitle:".", 
  Picture:".",
  ODataType:Blank()
}
Highlighted
Frequent Visitor

Re: Patch Person or Group field no longer working in Sharepoint 2016 On-Premise (NOT online)

Did you ever get this working? I also have issue setting a person field SharePoint 2016 on premise using a data gateway.

 

The suggested answer doesnt work.

 

Thanks

Highlighted
Power Apps
Power Apps

Re: Patch Person or Group field no longer working in Sharepoint 2016 On-Premise (NOT online)

Hi @stingray,

 

Are you seeing any error message come up in a red banner at the top of your app? Also, a session ID would help with the investigation. If you could reproduce the issue then grab the session ID, that would be great. Here is some documentation on finding the session ID: https://docs.microsoft.com/powerapps/maker/canvas-apps/get-sessionid

 

Thanks,

Allen

Highlighted
New Member

Re: Patch Person or Group field no longer working in Sharepoint 2016 On-Premise (NOT online)

I have te same issue 

this is my call:

Patch(
'Approval Tasks',
SelectedInvoice,
{
To: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.w|sgh\\xxxxx,
DisplayName: "xxxxx",
Email: "xxxx@xxxx.com",
Picture: "",
Department: "",
JobTitle: "",
ODataType:Blank()
}

 

Highlighted
Power Apps
Power Apps

Re: Patch Person or Group field no longer working in Sharepoint 2016 On-Premise (NOT online)

Hi @SebastianB,

 

Can you provide a session ID of a session where the error occurs? You can find the session ID by using the following guide:

 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/get-sessionid

 

Thanks,

Allen

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,651)