cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ahhollan
Post Patron
Post Patron

cascading dropdown complexity

I have a table called TPS Regions. It houses a region like Chattanooga and an abbreviation column like CHA.  I have another table called TPS Sites. It houses sites like A, B,C and also has a column for Region that is the abbreviation column from TPS Regions.

I have a dropdown on my power app that lists the full region name like Chattanooga.  I have another drop down that should list all available sites in that region from the TPS Sites table.  How do I filter by the abbreviated value for region? Only abbreviated value is present in TPS Sites table.

 

thanks.

19 REPLIES 19
RandyHayes
Super User
Super User

@ahhollan

Without seeing some of the details, I will provide a general way to do this.

 

For your first dropdown (DropDown1), let's assume you have TPS_Regions as your Items property and that you have the region (the full name) as the display field.

For your second dropdown (DropDown2), you would the items property set to:

Filter(TPS_Sites, Abbreviation=DropDown1.Selected.Abbreviation)

And the Sites as the display field.

 

This should give you the filtered list in the second dropdown that you are looking for.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

I may not have explained this correctly.  The table TPS Regions has 2 columns, Region and Abbreviation.  Table TPS Sites has the Abbreviation from table TPS Regions, but not the Region column. I want to filter the dropdown to show all sites in TPS Sites for a given Abbreviation in TPS Regions.  I've tried what was suggested above and the 2nd dropdown doesn't return any sites for the selected region in dropdown 1. 

@ahhollan 

So as I understand it, you have a TPS Region list that has two columns - Region and Abbreviation.  You then have a TPS Sites list that has two (or more) columns - Abbreviation and Site.  

The previously mentioned formulas should provide this for you.

 

What is the formula for your first DropDown Item Property?

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Distinct('TPS Regions',Region)

@ahhollan 

Is there a specific reason you are using Distinct?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

I removed Distinct and dropdown 2 still isn't working. Dropdown 1 is working fine.

@ahhollan 

The reason I asked about Distinct was, if you needed it, then we would have a slightly different approach to the resolution.

But, if you do not, then...

 

Confirm please:

Your formula for the DropDown1 Items is now:  'TPS Regions'

Your formula for the DropDown2 Items is now: Filter('TPS Sites', Abbreviation=DropDown1.Selected.Abbreviation)

 

Also, please place a Label on the screen and set the Text property to the following (for troubleshooting):

   DropDown1.Selected.Abbreviation

 

Confirm the above and let me know what you see in the label.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Formula is as you requested for dropdown1.  However, formula for dropdown2 would only allow me to use Region instead of Abbreviation.  Filter('TPS sites',TSC=DataCardValue51.Selected.Region)  TSC is the column name for Abbreviation. Sorry for the confusion on the column name.

@ahhollan 

Okay, let's explore a bit.   You have verified that the DropDown1 Items property formula is 'TPS Regions' , so, for that DropDown, in the Properties Pane on the right, you have a Value choice - it is currently Region.  Does Abbreviation appear in the Value choices, or only region?

If you only see Region - what kind of column is Abbreviation in your list?  And, are we dealing with SharePoint here or SQL or other?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

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.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,842)