cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Elitezone
Post Prodigy
Post Prodigy

ComboBox - default value taken from AD organisation

Hello,

 

How can I make a combobox (drop-down) that will have default value with a manager from AAD organisation.

 

Problem:

I have a dropdown box that I use to pick a person from a list. You need to search in this dropdown or write in it to find your manager.

I want to have this dropdown with default value direct manager from 365 organisation.

 

How can that be achieved?

Also if someone change this default value is it possible to detect it and shows another field - why you changed it?

1 ACCEPTED SOLUTION

Accepted Solutions

@Elitezone To change the visibility you can use the formula something like below:

 

 

Not(ComboBox1.Selected.DisplayName = Office365Users.Manager(User().Email).DisplayName)

 

OR

Not(ComboBox1.Selected.Mail = Office365Users.Manager(User().Email).Mail)

Set this formula to Visible property of your input box. Where ComboBox1 is the name of your combobox/dropdown control.


Please click Accept as solution if my answer helped you to solve your issue. This will help others to find the correct solution easily. If the answer was useful in other ways, please consider giving it ‌‌👍

 

View solution in original post

4 REPLIES 4
ganeshsanap
Memorable Member
Memorable Member

@Elitezone 

You need to apply the below formula on DefaultSelectedItems property of Combobox:

 

DefaultSelectedItems = Office365Users.Manager(User().Email) 

ReferenceCreate People Picker in PowerApps with Combo Box 


Please click Accept as solution if my answer helped you to solve your issue. This will help others to find the correct solution easily. If the answer was useful in other ways, please consider giving it ‌‌👍

 

@ganeshsanap 

Thank you, but what about a second part of question, how to make an if statement with this data.

I want to make a input text with visibility that will appear only if someone change his manager.

 

I tried something like that:

If(ComboBox1.Selected.Mail = Office365Users.Manager(User().Email),false,true)

but it shows invalid argument type. 

Try

If(ComboBox1.Selected.Mail = Office365Users.Manager(User().Email).Mail,false,true)

@Elitezone To change the visibility you can use the formula something like below:

 

 

Not(ComboBox1.Selected.DisplayName = Office365Users.Manager(User().Email).DisplayName)

 

OR

Not(ComboBox1.Selected.Mail = Office365Users.Manager(User().Email).Mail)

Set this formula to Visible property of your input box. Where ComboBox1 is the name of your combobox/dropdown control.


Please click Accept as solution if my answer helped you to solve your issue. This will help others to find the correct solution easily. If the answer was useful in other ways, please consider giving it ‌‌👍

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (5,287)