cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sanderson82
Level: Powered On

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
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
Highlighted
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
Level: Powered On

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

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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,938)