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?
Solved! Go to Solution.
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.
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.
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.
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.
User | Count |
---|---|
33 | |
16 | |
15 | |
14 | |
7 |
User | Count |
---|---|
42 | |
19 | |
12 | |
10 | |
10 |