Bhubaneswar, Odisha, India
+91-8328865778
support@softchief.com

Implementing Dynamics Dropdown Filtering in Canvas APP

Implementing Dynamics Dropdown Filtering in Canvas APP

Cascading dropdowns allow users to select values in a hierarchy. For example, when a user selects a Country, the State dropdown is filtered to show only states in that country. Similarly, selecting a State filters the City dropdown to show only cities within that state.


Step-by-step guide : Watch the Video or scroll to read the article.

  1. Data Source:
    • Use a Dataverse table or an Excel file stored in OneDrive/SharePoint.
    • Structure the data like this (Table Name: LocationData):CountryStateCityIndiaOdishaBhubaneswarIndiaOdishaCuttackIndiaKarnatakaBangaloreUSACaliforniaLos AngelesUSACaliforniaSan FranciscoUSATexasAustin

2️⃣ Add Controls to the Canvas App

  1. Country Dropdown
    • Insert a Dropdown control (DropdownCountry).
    • Set the Items property of the dropdown to:powerappsCopy codeDistinct(LocationData, Country)
  2. State Dropdown
    • Insert another Dropdown control (DropdownState).
    • Set the Items property of the dropdown to:powerappsCopy codeDistinct(Filter(LocationData, Country = DropdownCountry.Selected.Result), State)
  3. City Dropdown
    • Insert another Dropdown control (DropdownCity).
    • Set the Items property of the dropdown to:powerappsCopy codeDistinct(Filter(LocationData, Country = DropdownCountry.Selected.Result && State = DropdownState.Selected.Result), City )

3️⃣ Explanation of Key Concepts

  • Distinct: Extracts unique values from the specified column.
  • Filter: Filters records based on the conditions provided.
  • DropdownCountry.Selected.Result: Gets the selected value from the Country dropdown.
  • DropdownState.Selected.Result: Gets the selected value from the State dropdown.

Hope it helps.

Leave a Reply