cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RPower
Frequent Visitor

Set value in filtered dropdown based on selection from another filtered dropdown

I have three dropdowns. Dropdown1 needs to filter dropdown2 and dropdown3 in the same way. The user should then be able to interact with EITHER 2 or 3, and that selection should populate the remaining dropdown. 

 

DepartmentLocation IDLocation Name

IT

12Location A
IT43Location B
Marketing56Location C

 

So if I pick "IT" then I can pick either "12" or "43" from dropdown2, and it populates "Location A" or "Location B" into dropdown 3 respectively. This also needs to run in reverse, where choosing dropdown1= "IT" and then a user picks dropdown3= "Location A", should populate "12" in dropdown2.

 

I have gotten to the point where I have dropdown2 and dropdown3 filtering correctly when choosing dropdown1. I am stuck specifically on how to set the default value for dropdown2 or dropdown3 depending on the selection of the opposite dropdown.

 

EDIT: I have figured out how to get dropdown3 to populate based on dropdown2, but if I try to use the same solution for both I get a circular error 

Dropdown3:

Default= LookUp(Table2,'Location ID'=Dropdown2.Selected.'Location ID','Location Name')

 

Dropdown2:

Default= LookUp(Table2,'Location Name'=Dropdown3.Selected.'Location Name','Location ID')

1 ACCEPTED SOLUTION

Accepted Solutions

@RPower ,

Again a bit "clunky" but you could have two sets of controls (forward and reverse logic) and show/hide them on the OnChange of each drop-down.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

View solution in original post

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @RPower ,

Correct - you cannot do this (controls cannot be dependent on the output of each other). The only (very clunky and not without issues) way would be to generate collections on the OnChange of each one and then have these collections as the Items of the drop-downs.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

 

Do you have any alternative design ideas? My users may not necessarily know the name of the location and/or the id of a location, and it would be nice if they could pick either/or and then see the resulting information, without adding too much real estate to the UI.

@RPower ,

Again a bit "clunky" but you could have two sets of controls (forward and reverse logic) and show/hide them on the OnChange of each drop-down.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

WarrenBelz
Super User
Super User

Hi @RPower ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (1,343)