cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sanderson82 Helper IV
Helper IV

Default dropdowns based on logged on user

Hi, I would like to default a couple of dropdown selections based on the logged on user.

 

First dropdown, "I_Supervisor" is a list of supervisors (when selected this filters another list to their team members).  The value in this list would be the same as the logged on user name.

 

The second dropdown is a list of projects.  For one supervisor, they are always working on the same project, therefore when that user is logged in I would like that project selected.  

 

Note: I'm not using any forms

 

Many thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: Default dropdowns based on logged on user

Hey @sanderson82 

 

If you donot want to display Supervisor name you can directly pass User().FullName in the Default property. User() function is used to get the details about the current user.

Glad that you are able to get the desired output. If the issue is resolved, please mark the thread as solved so that it might be helpful to other users as well.

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

3 REPLIES 3
Dual Super User
Dual Super User

Re: Default dropdowns based on logged on user

Hey @sanderson82 

 

Can you share more details about the schema of your datasource? If you can share more details, we might help you in building the formula correctly.
 
A sample expression that can be placed on the Default property of the second dropdown is:
 
LookUp(DataSourceName, Dropdown1.Selected.Supervisor in TeamMemberColumn && User().Email in TeamMemberColumn)
 
Here, DataSourceName is the datasource with column TeamMemberColumn which contains all the project members. If this differs, please share the schema and we can build an expression suitable for this case.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
sanderson82 Helper IV
Helper IV

Re: Default dropdowns based on logged on user

Hi @yashag2255 

 

I've managed to achieve what I needed.

 

For the first dropdown picking the supervisor, I have created a label called I_User and set this to User().FullName.  Then on the I_Supervisor dropdown I have set the default to I_User.Text.

 

For the project dropdown I have set the default to

If(I_User.Text="Username","ProjectName",1)

Simpler than I thought, perhaps maybe not best practice but seems to be working for what I need

Highlighted
Dual Super User
Dual Super User

Re: Default dropdowns based on logged on user

Hey @sanderson82 

 

If you donot want to display Supervisor name you can directly pass User().FullName in the Default property. User() function is used to get the details about the current user.

Glad that you are able to get the desired output. If the issue is resolved, please mark the thread as solved so that it might be helpful to other users as well.

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,820)