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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (3,245)