cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

Check if multi-select people picker has changed

Hi everyone

I have a list that contains an assigned to field which is a people picker field that accepts multiple selections.  I have created a flow with the trigger "When an item is created or modified" which then sends an e-mail to the user(s) in the assigned to field.  This works fine but sends the e-mail every time the item is modified even if the field hasn't changed.

I was thinking of creating a field called previous assigned and initially set this to the value of the assigned to field.  I could then check if the two fields match in the flow and if they don't, send the e-mail notification.  The only issue is I'm not sure how to do this with the multiple choice people picker?  If it was just a single choice field this would be simple but I'm not sure how I can compare a list of users in the multiple choice people picker with a text field?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

@gj84uw 

A multi-select person or group column contains a collection.  So, one way to approach your issue is to loop through the collection and append each person selected to a string.  See my example below.  I have a multi-select person or group column called PG where I have entered two people.  The compose action at the end is there just to show the result - you won't need it if you implement this solution.  You can store the string in your additional column.  Then create a new string when the item changes to compare.

PeopleString1.jpgPeopleString2.jpg

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

2 REPLIES 2
Super User III
Super User III

@gj84uw 

A multi-select person or group column contains a collection.  So, one way to approach your issue is to loop through the collection and append each person selected to a string.  See my example below.  I have a multi-select person or group column called PG where I have entered two people.  The compose action at the end is there just to show the result - you won't need it if you implement this solution.  You can store the string in your additional column.  Then create a new string when the item changes to compare.

PeopleString1.jpgPeopleString2.jpg

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

Helper I
Helper I

On page load collect
Collect(ColUsersOnPageLoad, ComboBoxUsers.AllItems)

Then on before submit code.

Collect(ColBeforeSubmit, ComboBoxUsers.AllItems)

and compare two colls: 
 If(Concat(ColUsersOnPageLoad, Email& ",") = (Concat(ColBeforeSubmit, Email & ","), ...


Then you can set hidden column in SPList: AreUsersUpdated = true or false, then this condition you can check before running flow action.

Note: For getting only new users from column is no straight forward as of now, this needs a lot of custom logic.

 

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (3,825)