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
Super User
Super User

@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 ‌‌👍

 

View solution in original post

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,148)