Cascading Dropdown In Power Apps With Dataverse Look Up Columns

Overview

I have come across a scenario where we need to make cascading dropdown for our form.

I have two columns in the Dataverse table named – Locations and Store Name. Both Columns are Look Up columns.

Cascading Dropdown In Power Apps With Dataverse Look Up Columns

Below is the master table for Locations.

Cascading Dropdown In Power Apps With Dataverse Look Up Columns

Below is the master table for Store Names with Locations as Look Up Columns.

Cascading Dropdown In Power Apps With Dataverse Look Up Columns

Now, in the form based on the Locations, we want to filter our store names.

Let’s get started!

Step 1

Open the form control and check the code for the first Look Up Column – Locations.

Cascading Dropdown In Power Apps With Dataverse Look Up Columns

For Items -below is the default code

Choices([@'Performance Reviews'].ppt_Location)

Step 2

Write on the change event for the Locations dropdown and find all the stores from actual Store Names tables.

ClearCollect(
    colstoreNames,
    ShowColumns(
        Filter(
            'Store Names',
            Location.Loc = DataCardValue17.Selected.Loc
        ),
        "ppt_storenamesid"
    )
);

Cascading Dropdown In Power Apps With Dataverse Look Up Columns

Step 3

Open the Store Locations Dropdown and change the Items code like this:

Filter(Choices([@'Performance Reviews'].ppt_StoreName),ppt_storenamesid in colstoreNames)

Cascading Dropdown In Power Apps With Dataverse Look Up Columns

Step 4

Test the code,

Cascading Dropdown In Power Apps With Dataverse Look Up Columns

Change value from Look Up Column. It will change the value in another look up column dropdown.

Conclusion

This is how we can apply cascading dropdown for Dataverse Look Up columns!


Similar Articles