How to Create Dependent Dropdowns (Cascading Dropdowns) in Power Apps

This guide explains how to link two dropdown menus in a Power Apps Canvas App so that the options in the second dropdown change based on the selection in the first one.

This common pattern is often called “Cascading Dropdowns” or “Dependent Dropdowns.”

スポンサーリンク

Prerequisites: SharePoint List Setup

First, we need a data source that defines the relationship between the two categories. We will use a SharePoint list for this example.

1. Master Data List
Create a list (e.g., “MasterList”) with two columns to hold your category data.
In this example:

  • Title: The parent category (Selection 1)
  • Value: The child option (Selection 2)

SharePoint List Data Example

2. Target List
Create the list where users will save their data. Add two columns for “Selection 1” and “Selection 2”.
Target SharePoint List Columns

Step-by-Step Implementation in Power Apps

1. Change Text Input to Dropdown

By default, Power Apps may create “Text Input” fields. We need to change these to “Allowed Values” to use Dropdowns.

1. Select your Form control.
2. In the right properties pane, find the fields for “Selection 1” and “Selection 2”.
3. Change the Control Type from “Edit Text” to “Allowed Values”.
Change Control Type to Allowed Values

2. Connect to the Master Data Source

Add your “MasterList” (the one with the categories) as a data source in your app.

Go to View > Data sources > Add data > SharePoint, and select your master list.
Add SharePoint Data Source

3. Configure the Parent Dropdown (Selection 1)

We want the first dropdown to show unique values from the “Title” column of our Master List.

1. Select the Dropdown control inside the “Selection 1” DataCard. (You may need to unlock the card first).
2. Set the Items property to:

Distinct(MasterList, Title)

Distinct Function Example

Note: The Distinct function removes duplicate values, so even if your list has multiple rows for category “A”, it will only appear once in the dropdown.

Fixing DataCard Errors:
If you see an error on the DataCard’s Update property, it’s because the dropdown now outputs a Result record. Update the DataCard’s Update property to:
DataCardValueX.Selected.Result (where DataCardValueX is your dropdown name).

4. Configure the Child Dropdown (Selection 2)

Now, we filter the second dropdown based on what is chosen in the first one.

Using the “Depends on” Feature (No Code Method)
1. Select the second Dropdown (Selection 2).
2. In the properties pane, verify the Items property is unlocked.
3. Click Depends on.
Depends on Setting
4. Configure the dependency:
Parent Control: Choose your first Dropdown (Selection 1).
Data Source: Choose your “MasterList”.
Matching Field: Choose the column that matches the parent value (Title).
Dependency Configuration

Power Apps will automatically generate a Filter formula in the Items property for you. It usually looks something like this:

Filter(MasterList, Title = DataCardValueSelection1.Selected.Result)

Testing the App

Preview the app. When you change the value in “Selection 1”, the options in “Selection 2” should update automatically.

Testing Dependent Dropdowns

Related Articles

コメント

Copied title and URL