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 / label values from Comb...
Power Apps
Answered

label values from ComboBox

(0) ShareShare
ReportReport
Posted on by 157

Hi, 

 

I have a ComboBox with items :

 

Office365Users.SearchUser()

 

 it should list of all users 

 

I have 2 labels 

1- Department Name with Text

Office365Users.ManagerV2(ComboBox1_1.Selected.Mail).displayName

 

2- Manager Name with Text

Office365Users.ManagerV2(ComboBox1_1.Selected.Mail).department

 

now I have 2 issues : 

 

  • sometime I'm getting values & some other times no!, maybe wrong code !

 

  • if this ComboBox empty ( no value ) I need to show "No user selected" , I tried with : (If Empty) & (If Blank ) but I missing something, it's not working with me .
Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,129 Most Valuable Professional on at

    1) When you aren't getting values I would verify that the selected user actually has a manager recorded and that the manager has a department listed.  These values might be blank.

    2) I'm not uite sure why IsBlank doesn't work.  But try this function in your label instead. It works for me.

    If(ComboBox1.Selected.Mail = "",Office365Users.ManagerV2(ComboBox1.Selected.Mail).displayName,"No user selected")
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @ElMeSaFeR ,

    Could you please share a bit more about your scenario?

    Do you mean that you could see the value within the two Labels sometimes, somr other times not?

     

    Currently, there is an known issue with the the Office365Users.SearchUser() function, it could only retrieve 999 records at most once time.

     

    Please consider modify your formula as below:

    Set the Items property of the ComboBox to following:

    Office365Users.SearchUser({searchTerm: ComboBox1.SearchText, top:999})

    set the Primary text property and SearchField property to following:

    DisplayName

     

    Set the Text property of the Department Label to following:

    If(
     IsBlank(ComboBox1.Selected),
     "No User Selected",
     Office365Users.ManagerV2(ComboBox1_1.Selected.Mail).department
    )

    Set the Text property of the Manager Name Label to following:

    If(
     IsBlank(ComboBox1.Selected),
     "No User Selected",
     Office365Users.ManagerV2(ComboBox1_1.Selected.Mail).displayName
    )

     

    Please consider take a try with above solution, check if the issue is solved.

     

    Best regards,

  • Sharif Alhennawy Profile Picture
    157 on at

    it's really help, just make some changes 

     

    If(
     IsBlank(ComboBox1_1.Selected),
     "No user selected",
     Office365Users.UserProfileV2(ComboBox1_1.Selected.Mail).department
    )

    because I need the department of user that selected from ComboBox 

     

    I have another inquiry, is there any other syntax I can use it to list all Office 365 users ?  

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

    Hi @ElMeSaFeR ,

    Do you want to list all Office 365 Users in your Tenant in PowerApps app?

     

    If you want to list all Office 365 Users in your Tenant in PowerApps app, I afraid that there is no direct way to achieve your needs in PowerApps currently.

    Note: The Office365Users.SearchUser() function could only retrieve 999 records at most.

     

    If the amount of your Office 365 Users is more than 999, and you want to list all of them in your app, as an alternative solution, I think a custom connector could achieve your needs.

    You could consider create a custom connector based on MS Graph REST API within your PowerApps, then specify proper action in your custom connector to retrieve users from your Tenant. After that, you could use the custom connector to retrieve all users from your tenant without the '999' limits.

    More details about creating a custom connector in PowerApps based on MS Graph REST API, please check the following blog:

    https://gotoguy.blog/2017/12/17/access-microsoft-graph-api-using-custom-connector-in-powerapps-and-flows/

     

    More details about the action path to retrieve users from Office 365 tenant through MS Graph REST API, please check the following article:

    https://docs.microsoft.com/en-us/graph/api/user-list?view=graph-rest-1.0&tabs=http

     

    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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard