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) ?

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()
}