How To Patch A SharePoint Person Column In Power Apps

In this blog, we are going to see how to use the patch function to update a SharePoint Person column in Power Apps. 

In a SharePoint list we have a column RequestedBy, our goal is to update a RequestedBy (Person type) from Blank to “Nagalingam Ravishankar”.

Input

Meeting Request (SharePoint List)

IDRequestedByRequestDateTime
127/12/2022 10:47AM27/12/2022 10:47AM

Patch Function Code

Patch(
    'Meeting Request',
    LookUp('Meeting Request', ID=1),
    {
        RequestedBy: {
           '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
           Claims: "i:0#.f|membership|ravishankar.nagalingam@companyname.com",
           Department: "",
           DisplayName: "Nagalingam Ravishankar",
           Email: "ravishankar.nagalingam@companyname.com",
           JobTitle: "",
           Picture: ""
        }
    }
)

Output

Meeting Request (SharePoint List)

IDRequestedByRequestDateTime
1Nagalingam Ravishankar27/12/2022 11:47AM

There is another way to Patch a value from a combo box to a People field.

How To Patch A SharePoint Person Column In Power Apps

ComboBox Properties Code

Items: Choices('[@Meeting Request'].RequestedBy)
DisplayFields: ["DisplayName"]
SearchFields: ["DisplayName"]

Patch Function Code

Patch(
    'Meeting Request',
    LookUp('Meeting Request', ID=1),
    {
        RequestedBy: ComboBoxPerson.Selected
    }
)

That’s it, I hope you have seen how to use the patch function to update a SharePoint Person column in Power Apps. Feel free to fill up the comment box below if you need any further assistance.

Find more great Power Platform blogs on Power Platform Week.

About the Author

Working as Software Engineer at Cognizant. I’m a C# Corner MVP, Blogger, and Speaker. Having 5+ years of experience over Microsoft technologies and expertise in SharePoint, Power Apps, Power Automate, C#.NET, Microsoft Azure, IoT, Angular, Python and PowerShell.

Reference

Ravishankar, N., 2022, How To Patch A SharePoint Person Column In Power Apps, Available at: How To Patch A SharePoint Person Column In Power Apps (c-sharpcorner.com) [Accessed on 10 January 2023]

Share this on...

Rate this Post:

Share: