How to Sort Power Apps Cascading Dropdown?

In this Power Apps tutorial, I will explain how to sort Power Apps Cascading Dropdown.

Let’s implement the properties below to the Power Apps cascading dropdown to display values in a sorted manner [A-Z] or [Z-A].

How to Sort Power Apps Cascading Dropdown

This section will show you how to sort Power Apps cascading dropdowns.

Note:

“Sorting the cascading dropdown control will make it easier for the users to find the values they need”

Example,

I have a SharePoint list [Netflix User Information] that has various columns like:

Column NameData Type
User NameTitle
Subscription TypeChoice [“Premium”, “Basic”,”Standard”]
DeviceChoice [“Smartphone”, “Tablet”, “Smart TV”, “Laptop”]
CountrySingle line of text
Power Apps cascading dropdown sort

I created a Power Apps Canvas app and added two Dropdown controls. The first dropdown control contains values from the SharePoint list choice column [Subscription Type].

As shown below, when a user selects a value from the first dropdown, the values in the second dropdown should dynamically update, either in ascending or descending order, dependent on the user’s selection from the first dropdown:

Sort Power Apps cascading dropdown

Let’s see how to achieve it:

  • On the Power Apps screen, insert a Dropdown control -> Set its Items property to:
Distinct(
    'Netflix User Information',
    'Subscription Type'.Value
)

Where,

  1. Netflix User Information = SharePoint list name
  2. Subscription Type = SharePoint list choice column name
How to Sort Power Apps Cascading Dropdown
  • Besides the first dropdown control, insert another Dropdown control -> Set its Items property to:
Sort(
    Distinct(
        Filter(
            'Netflix User Information',
            'Subscription Type'.Value = 'drp_Subscription Type'.Selected.Value
        ),
        Country
    ),
    SortOrder.Ascending
)

Where,

  1. Netflix User Information = SharePoint list name
  2. Subscription Type = SharePoint list choice column name
  3. drp_Subscription Type = First dropdown control name
  4. Country = SharePoint list another column name
How to sort Power Apps cascading dropdown
  • Save, Publish, and Preview the app. When a user selects a value from the first dropdown, the values in the second dropdown will dynamically adjust in ascending order based on the selection made.
Power Apps sort cascading dropdown

This is how we can sort a Power Apps cascading dropdown.

Conclusion

This Power Apps tutorial explained how to sort a Power Apps cascading dropdown control with an example.

Also, you may like some more Power Apps tutorials: