web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / One particular O365 Us...
Power Apps
Unanswered

One particular O365 User Display Name not being displayed in a Gallery

(1) ShareShare
ReportReport
Posted on by 16
Hi all,
I have built a Canvas app using Sharepoint as the data source.  I have used Office365Users as my source for a Staff name field which is working great.  The app is fully functional and is able to successfully patch everything to the Sharepoint list.  The weird thing is that there are a few users where their names will not show up in the gallery.  They are saved properly in the Sharepoint list and even show up with a checkmark next to their name in the list, but will absolutely not show up in the field itself.  The vast majority show up just fine.  Again, they are populated in the Sharepoint list.  I have found two so far out of a 50 or so that I've tried..  Any help would be appreciated.
 
Here is my defaultselecteditems property:
ThisItem.'AM Staff'
 
Here is my items property:
Office365Users.SearchUserV2({searchTerm:(Self.SearchText),isSearchTermRequired:false, top:(999)}).value
Categories:
I have the same question (0)
  • stampcoin Profile Picture
    5,058 Super User 2025 Season 2 on at
    Are you able to search the user name against your formula ?
    Those users name come from canvas app or added in sharepoint before ?
    If you change the display format in sharepoint ( list sitting), do you see any difference ?
  • WarrenBelz Profile Picture
    153,032 Most Valuable Professional on at
    The fundamental issue here is that the schema from your Items is different to that of the Person field stored in the SharePoint List.  The DefaultSelectedItems should be
    {
       DisplayName: ThisItem.'AM Staff'.DisplayName,
       Mail: ThisItem.'AM Staff'.Email
    }
    This will also affect the Update of the Data Card
    {
       Claims: "i:0#.f|membership|" & Lower(ComboBoxName.Selected.Mail),
       Department: "",
       DisplayName: ComboBoxName.Selected.DisplayName,
       Email: ComboBoxName.Selected.Mail,
       JobTitle: "",
       Picture: ""
    }
    
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn   
  • SadFox Profile Picture
    61 on at
     
    If the number of users exceed 2000 this doesnt works.
    I usually Use the Choices of the PeoplePicker column. This Shows the users in the tenent.
     
    Choices(ListDataSouce[@PeoplePickerColumn])
     
  • WarrenBelz Profile Picture
    153,032 Most Valuable Professional on at
    If you use Choices(ListName.PersonFieldName) as the Items, it will only display users currenly in the data set (you cannot add another user not already there). It is best to use an Entra search such as either the one I posted or if you have all users in the same O365 Group, you can use 
    Office365Groups.ListGroupMembers(
       "YourGroupIDHere",
       {top: 999}
    ).value
    this one also changes the schema  to displayName and mail instead of DisplayName and Mail from the Users search.
  • CM-12051421-0 Profile Picture
    16 on at
    Thanks @WarrenBelz.  I modified the DefaultSelectedItems to the following and it still does not work.  Again, the values are being patched correctly to the list and the vast majority of the display names show up in the comboboxes.  And when I search the combo box, I see the name with a checkmark next to it and can select it.  But when the gallery loads/refreshes, some of the display names just don't show up in the box.  
    Here is DefaultSelectedItem:  
    Office365Users.SearchUserV2({searchTerm:ThisItem.'Classroom Staff'.DisplayName, top:(1)}).value
     
    Items:  
    Office365Users.SearchUserV2({searchTerm:(Self.SearchText),isSearchTermRequired:false, top:(999)}).value
     
    I'm at a complete loss why only a few of the names won't load into the combobox even though they are stored in the List and are searchable in the combobox.
  • WarrenBelz Profile Picture
    153,032 Most Valuable Professional on at
    I may be missing something here, but 'Classroom Staff' is a Person field with all the elements present - why the search ? If you simply want to default the current record value from that field - in the DefaultSelectedItems
    {
       DisplayName: ThisItem.'Classroom Staff'.DisplayName,
       Mail: ThisItem.'Classroom Staff'.Email
    }
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn   
  • WarrenBelz Profile Picture
    153,032 Most Valuable Professional on at
    A quick follow-up to see if you received the answer you were looking for or if you need further assistance.

    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn   

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard