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.
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:
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.
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.
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?
Is there a specific reason you are using Distinct?
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...
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):
Confirm the above and let me know what you see in the label.
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.
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?
Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.
Your chance to join an engaging competition of Power Platform enthusiasts.
The Super User program for 2022 - Season 2 has kicked off!
Attend in person or online, there are incredible conferences and events happening all throughout the month of September.