web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch SharePoint perso...
Power Apps
Answered

Patch SharePoint person or group

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a gallery where I need to update an individual SharePoint record in a list called 'Meeting Schedule'.  I can't quite seem to get the syntax or code correct to update the Person/Group field in the SharePoint list.  I'm basically clearing out a whole group of fields and setting them to blank.  The field 'SSM' is the People/Group field. 

 

Patch('Meeting Schedule',ThisItem,

{Title:"", Location: "",
SSM:

{'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Claims: "",
Department: "",
DisplayName: "",
Email: "",
JobTitle: "",
Picture: ""}
})

Categories:
I have the same question (0)
  • HadynM Profile Picture
    279 on at

    Hi @Anonymous

    A great response from @v-micsh-msft on this post:

    https://powerusers.microsoft.com/t5/General-Discussion/Saving-data-from-powerapps-to-SP-lists-person-Group-column/td-p/77329

     

    I create a variable for each claim (person) that I want to include in a patch:

    Set(requesterClaim,{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims:"i:0#.f|membership|" & User().Email,
     Department:"",
     DisplayName:User().FullName,
     Email:User().Email,
     JobTitle:"",
     Picture:""
     });
    Set(newBooking, 
     Patch(CafeteriaBookings,Defaults(CafeteriaBookings), {
     Title: "Booking",
     Requester: requesterClaim,
     Reason: tiReason.Text,
     docHTML: htmlDoc,
     PreviousState: ""
     })
    )

    The Claims, DisplayName, and Email are the required fields.

    Hope that helps

    Hadyn

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks @HadynM

     

    I'm trying to null out the person/group field and I don't think the below solution addresses that?  Please correct me if I'm wrong.  My goal is to clear out the field and this is where I'm stuck.  Thanks for any help you can provide.

  • Verified answer
    HadynM Profile Picture
    279 on at

    Aaaaahhhh my mistake, sorry.

    Using MS Flow is the only way I've been able to get it to work.

    This article gives a good indication of how to do it:

    https://poszytek.eu/en/microsoft-en/office-365-en/powerapps-en/clear-lookup-and-people-picker-fields-in-powerapps/

    If you haven't used the sharepoint http request action before the following line gave me the most trouble:

    "__metadata":{"type":"SP.Data.MyListNameListItem"}

    It is a double underline at the start and the name of your list in bold.

    I would be interested if you figure out how to do it directly from PowerApps.

    Cheers

    Hadyn

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks @HadynM, I'll give it a try.  Appreciate the help.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @HadynM - Just wanted to say thank you for your help here.  I had abandoned working on this for awhile and came back to it recently and your tips were enormously helpful and it's working beautifully in Flow.  I plan to call the flow from PowerApps or use some other Flow trigger (haven't figured this part out yet but shouldn't be too complicated).

    Thanks again!

     

  • BrentonC Profile Picture
    3 on at

    This also worked for me, I changed the code a little, but it worked like a charm!

     

    Patch( 'FiveWhysSettings', First( Filter( 'FiveWhysSettings', Title = FixedPlant")),
    {
    ReliabilityEngineer: ComboBoxJobPerson.Selected.Value, 
    
    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims:ComboBoxJobPerson.Selected.Claims,
     Department:ComboBoxJobPerson.Selected.Department,
     DisplayName:ComboBoxJobPerson.Selected.DisplayName,
     Email:ComboBoxJobPerson.Selected.Email,
     JobTitle:ComboBoxJobPerson.Selected.JobTitle,
     Picture:ComboBoxJobPerson.Selected.Picture
     }
    }
    )

     

  • chaluvadik Profile Picture
    5 on at

    I am trying to create an item in SharePoint list from Canvas App, and I need to pass the current user name to 'Person or Group' column of SharePoint, Hadyn solution worked well.

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

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
wolenberg_ Profile Picture

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard