cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Continued Contributor
Continued Contributor

@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
Highlighted
Continued Contributor
Continued Contributor

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

 

Highlighted

@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. 

Highlighted

Try

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

@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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (16,200)