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

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

 

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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

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
Users online (4,823)