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

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

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.

Power Apps Staff AllenKim
Power Apps Staff

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()
}
stingray
Level: Powered On

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

Power Apps Staff AllenKim
Power Apps Staff

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

SebastianB
Level: Power Up

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

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
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,987)