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 / Update multiselect peo...
Power Apps
Answered

Update multiselect people picker column from collections using patch

(0) ShareShare
ReportReport
Posted on by 407

Hi all,

 

I have a SharePoint list with three columns (Title, Dep1, Dept2). Dept1 and Dept2 are both multiselect people picker columns. I want the ability for users to go into Power Apps and click a button 'Change to Dept1' and it would grab that user from Dept2 and move it to Dept1 and vice versa. 

 

Can someone please point me in the right direction on how to accomplish this? 

 

Thanks

Categories:
I have the same question (0)
  • Verified answer
    DavidZoon Profile Picture
    738 Most Valuable Professional on at

    Hello,

     

    Hello,

    A possible solution would be to make two collections of people in each department, example: 'ColDept1' and 'ColDept2'

    Then add the "Change department" button and put in its onselect:

     

    With({
     MeInDept1 : Lookup(ColDept1,Email=User().Email),
     MeInDept2 : Lookup(ColDept2,Email=User().Email)},
     If(IsBlank(MeInDept1) , false, 
     Collect(ColDept2,MeInDept1);RemoveIf(ColDept1,Email=User().Email);Patch(Source,ThisItem,{Dept1 : ColDept1,Dept2 : ColDept2}));
     If(IsBlank(MeInDept2) , false, 
     Collect(ColDept1,MeInDept2);RemoveIf(ColDept2,Email=User().Email);Patch(Source,ThisItem,{Dept1 : ColDept1,Dept2 : ColDept2}))

     

    It's a draft, you'll proabbly need to adjust some () 😁

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily.

  • _sourcecod3_ Profile Picture
    407 on at

    Hi @DavidZoon ,

    This helped a lot. I did end up tweaking the code and to meet my reqs and got it working. 

     

    Cheers!

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 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 136 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard