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 / Anyone know how to rem...
Power Apps
Unanswered

Anyone know how to remove a specific person from a Person field in SharePoint from a Power App?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am wanting to let users add/remove people from a multi-select Person field in SharePoint, but I've never tried to do so outside of a form. Is there a way to do this with PATCH and a Collection?

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

    Hi @Anonymous 

     

    We can patch multiple persons in Powerapps. I assume you have Combobox to search user and select

    Patch(
     SPList,
     LookUp(
     SPList,
     ID = BrowseGallery1.Selected.ID
     ),
     {
     MultiplePeople: DataCardValue17.SelectedItems
     }
    )

     

    StalinPonnusamy_0-1632514549818.png

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @StalinPonnusamy, thanks for the reply! I actually don't have a user interaction with any sort of control per se. I'm wanting to let users click a delete icon for a person's entry in a gallery, which will then remove that person from the selected list in SharePoint.

     

    For example, if a Person list has three names (Joe, Leslie, Regina) and a person chooses to delete Joe, I want the new list to only have Leslie and Regina.

    Picture12.png
  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    This is not straightforward since this is a multi-select person column. I will work on this and send it to you.

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    Here is the setup

    1. Gallery 1 to display SP List

    2. Gallery 2 (Sub Gallery) to display Persons for that item

     

    Set the Items property to Gallery 2 to 

    ThisItem.MultiplePeopleColumn

    Insert Icon (X) and Label to display Name on the sub-gallery

     

    Set Label Text property to 

    ThisItem.DisplayName

     

    Set Icon OnSelect property to

    Set(
     personToRemove,
     ThisItem.Email
    );
    ClearCollect(
     colAllPersons,
     ForAll(
     Gallery1_1.Selected.MultiplePeople,
     {PersonEmailId: Email}
     )
    );
    Remove(
     colAllPersons,
     Filter(
     colAllPersons,
     PersonEmailId = personToRemove
     )
    );
    Patch(
     IssueTracker,
     LookUp(
     IssueTracker,
     ID = Gallery1_1.Selected.ID
     ),
     {
     MultiplePeople: ForAll(
     colAllPersons,
     {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims: "i:0#.f|membership|" & PersonEmailId,
     Department: "",
     DisplayName: "",
     Email: PersonEmailId,
     JobTitle: "",
     Picture: ""
     }
     )
     }
    )

     

    Looks like

    StalinPonnusamy_0-1632522694515.png

     

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    Please let us know if anything needs on your post. We can help with this.

     

    Please review my Blog Post if any questions on this post.


    Please do not forget to give kudos if you find the suggestion helpful or Accept it as a solution if works fine to help other users to find it useful.

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @StalinPonnusamy  is MultiPeople a column?

  • ProgrammerJaDe Profile Picture
    73 on at

    Beautiful! Thank you. 

     

    Process:

    - Tag a Person for deletion (with their email)

    - Build a collection of all the People

    - Remove the tagged Person from the created collection

    - Patch the original record with the newly modified collection

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Yes, MultiPeople is a  column in SharePoint.


    Thanks, Stalin (Microsoft MVP)
    Blog - Learn To Illuminate Blog
    YouTube - Learn To Illuminate Videos

     

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard