Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

get display names of all users from multiselect field in sharepoint list

(0) ShareShare
ReportReport
Posted on by 39

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

TitleAttendees
Item 1John Smith; Adam Johnson
Item 2John 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.  

 

  • Ardian Profile Picture
    Ardian 39 on at
    Re: get display names of all users from multiselect field in sharepoint list

    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. 

  • Verified answer
    Re: get display names of all users from multiselect field in sharepoint list

    Hi @Ardian,

    Just use the Ungroup():

    Distinct(ForAll(Ungroup(list_name,"Attendees"),DisplayName),Value)

     

     

  • Ardian Profile Picture
    Ardian 39 on at
    Re: get display names of all users from multiselect field in sharepoint list

    @SpongYe 

     

    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 

  • SpongYe Profile Picture
    SpongYe 5,378 on at
    Re: get display names of all users from multiselect field in sharepoint list

    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)
    )

    SpongYe_0-1705341595276.png

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

     

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,475

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,767

Leaderboard