cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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) ?

4 REPLIES 4
PowerApps Staff AllenKim
PowerApps 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.

PowerApps Staff AllenKim
PowerApps 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

PowerApps Staff AllenKim
PowerApps 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