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 / Get multiple users dis...
Power Apps
Answered

Get multiple users display name

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

While building an app im trying to have a text field with the required attendees of a selected meeting.

It retrieves a string like "xxx@xx.com;xx1@xx.com;". Now what i wanted to be able to do is to pick up that string and split it so it gets each email´s display name using the "useroffice365.userprofile".  This was my best try:

 

split.pngSomehow the mistake it´s point out is that the type of data to split needs to be text, but it actually is! 

 

Thanks for you help,

António Vasques

Categories:
I have the same question (0)
  • MarvinBangert Profile Picture
    1,924 Most Valuable Professional on at

    Hey @Anonymous 

    what kind of data type is your "_selectedCalendarEvent"? Is it a Power Apps collection with different columns and one column is called "RequiredAttendees"? Then the string within RequiredAttendees is a text, but with your code, you don't select the string within the column, you select the column itself which is a table. And you cannot select the text within the column.

    First, you need to get the information from your column "RequiredAttendees" with something like:

    ForAll(_selectedCalendarEvent.requiredAttendees,Split(requiredAttendees,";").Result)

    Then you will have only the results from your "requiredAttendees"-column (because you make a split, the last result is empty). Then you can work on this data. If you have just one record, you can use "First()" to get the value from your result:

    First(ForAll(_selectedCalendarEvent.requiredAttendees,Split(requiredAttendees,";").Result).Value).Value

    Image 660.png 

     

    Hope this will help you! 🙂

     

    Regards

    Marvin

     

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • MarvinBangert Profile Picture
    1,924 Most Valuable Professional on at

    You can also extend it to save all user information within a second collection (i used a button to call this):

    ForAll(Last(ForAll(_selectedCalendarEvent.requiredAttendees,Split(requiredAttendees,";").Result).Value).Value,Collect(userInfo,{Mail: Result,DisplayName: Office365Users.UserProfileV2(Result).displayName}))

     Image 661.png

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Could you please share a bit more about the data structure of "_selectedCalendarEvent" variable?

     

    Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. The data structure of my _selectedCalendarEvent variable as below:

    6.JPG

     

    7.JPG

    The _selectedCalendarEvent.RequiredAttendees formula would return the following email address:

    8.JPG

     

    If you want to get the corresponding display name based on each email address, please take a try with the following formula:

    9.JPG

    ForAll(
     Filter(Split(_selectedCalendarEvent.RequiredAttendees, ";"), !IsBlank(Result)),
     Office365Users.UserProfileV2(Result).displayName
    )

    Note: You need to add the Office365Users connection in your app firstly

    You could consider add a Data Table in your app, set the Items property to above ForAll formula. Then enable the Value field within the Data Table, then display name list would be listed:

    10.JPG

     

    On your side, please make sure the  _selectedCalendarEvent.RequiredAttendees formula returns a string value rather than a table value or record value. Also please make sure you specify proper Office365Users.UserProfileV2() function within the ForAll function.

     

    Best regards,

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 742

#2
Valantis Profile Picture

Valantis 474

#3
Haque Profile Picture

Haque 358

Last 30 days Overall leaderboard