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 an Item from Sha...
Power Apps
Answered

Patch an Item from SharePoint in PowerApps by adding a Person to a Person-Type column where multiple selections are allowed

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

I wanted to add a person (in my case a passenger) to a column Person Type by pressing a button in Powerapps. In Sharepoint, the column allows multiple people in a record.

I wanted to use the Patch() function and add the user with the User() function when the button is pressed.

Thanks in advance.

Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    You can add the current user as a person field in your SharePoint List by using the below expression:
     
    Patch(SPListName,Defaults(SPListName),{Title:"Test3456760",PersonField:Table({'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims:"i:0#.f|membership|" & User().Email,
     Department:"",
     DisplayName:User().FullName,
     Email:User().Email,
     JobTitle:"",
     Picture:""
     })})

    Hope this Helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    This didn't work for me because I dont have a UserList. All users are Office 365 Users.

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    Can you share more details about the UserList that you are referring to? All the Office365 users are by default present in the sharepoint Person type field. Are you getting any error when using the above formula?
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    hi @yashag2255 ,

    Now I can add add a user to the record, but only one. if I have already an user (or more) in the record it deletes it/them.

  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    If you want add data to existing data, then you may want to take few extra measure, please follow the below expression:
     
    ClearCollect(ExistingUsers,Table({'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
            Claims:"i:0#.f|membership|" & User().Email,
        Department:"",
       DisplayName:User().FullName,
             Email:User().Email,
          JobTitle:"",
           Picture:""
       }),LookUp(SPListName,Title = "test").PersonField);
       Patch(SPListName,LookUp(SPListName,Title = "test"),{PersonField:ExistingUsers})
     
    Here, we are creating a collection of the users that already exist as part of the record and adding current user value to it. Then finally this created collection is passed a Person field when patching an update to the record.
     
    Hope this helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    This worked. Thank you kind stranger.

    The only thing: i replaced 

    Title = "test"

    with

    ThisItem

    because i worked in a form.  

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard