Hi Everyone,
I have a SharePoint list with a multi select user field, in power apps i want to be able to add all distinct user names into a drop down.
Users
Title | Attendees |
Item 1 | John Smith; Adam Johnson |
Item 2 | John Smith; Mary Jan |
Ideal Results:
John Smith
Adam Johnson
Mary Jan
Any ideas how this can be achieved?
was able to get everything for a single select using below, however multi select is a challenge.
Something strange going on with my list, but this works great with a new list and new field. Exactly what I was looking for, thank you.
Hi @Ardian,
Just use the Ungroup():
Distinct(ForAll(Ungroup(list_name,"Attendees"),DisplayName),Value)
not sure if that helps. here is what i have so far, it does actually get all users, wondering if there is a better way of doing this, since i'm using double loop:
ForAll(
'Multi User',
ForAll(
ThisRecord.'User Name',
Collect(
_userName,
ThisRecord.DisplayName
)
)
)
Multi User is a SharePoint list, list has a People column called User Name which is a multi select
Hi @Ardian
Hope this helps:
ClearCollect(
YourCollection,
{Title: "Item 1", Attendees: "John Smith; Adam Johnson"},
{Title: "Item 2", Attendees: "John Smith; Mary Jan"}
);
Clear(ResultCollection);
ForAll(
YourCollection,
Collect(
ResultCollection,
Split(Attendees, ";").Value
)
);
ClearCollect(
ResultCollection,
Distinct(ResultCollection, Value)
)
If you have any questions or feedback, please let me know. Have a great day! 😊
-----------------------
PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]
I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻