Patch A SharePoint Person Column With Multiple People In Power Apps

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

In a SharePoint list we have a column RequestedFor, our goal is to update a RequestedFor (Person type) from Blank to "Nagalingam Ravishankar", "Ajith Shanmugam" and "Veeramani Subramani".

Input

Meeting Request (SharePoint List)

ID RequestedBy RequestDateTime
1   03/03/2023 10:47AM

Patch Function Code

Patch(
    'Meeting Request',
    LookUp('Meeting Request', ID=1),
    {
        RequestedBy: Table(
          {
             '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
           	  Claims: "i:0#.f|membership|[email protected]",
              Department: "",
              DisplayName: "Nagalingam Ravishankar",
              Email: "[email protected]",
              JobTitle: "",
              Picture: ""               
          },
          {
              '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
           	  Claims: "i:0#.f|membership|[email protected]",
              Department: "",
              DisplayName: "Shanmugam Ajith",
              Email: "[email protected]",
              JobTitle: "",
              Picture: ""     
          },
          {
              '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
           	  Claims: "i:0#.f|membership|[email protected]",
              Department: "",
              DisplayName: "Subramani Veeramani",
              Email: "[email protected]",
              JobTitle: "",
              Picture: ""     
          }
        )
    }
)

Output

Meeting Request (SharePoint List)

ID RequestedBy RequestDateTime
1 Nagalingam Ravishankar
Ajith Shanmugam
Veeramani Subramani
03/03/2023 10:57AM

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

How To Patch A SharePoint Person Column With Multiple People In Power

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.SelectedItems
    }
)

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