Cascading Dropdowns Using PowerApps

Introduction 

 
In this blog, we will see how to apply a cascade dropdown to a list field using Power Apps.
 
Step 1
 
We need to create two SharePoint generic lists named “Country” and “City”. The SharePoint generic list “Country” holds a column of type “single text line” showing country names and the SharePoint generic list “City” contains two columns. The first column name is “country,” which is of “look up” field type, inherited from the parent list “Country”. The second field is “City”, which is a single text line field with country names.
 
Cascading Dropdowns Using PowerApps
Img1. First custom list “Country”
 
Cascading Dropdowns Using PowerApps
Img2. Second custom list “City”
 
Step 2
 
Now we will create a list where we will apply power apps cascading. I have created a SharePoint generic list with the name “Employee Details”. I have created three columns in it. ”Emp_id” column is a type of “single line of text”, “Country” column is “look up” field type, it inherits values from “Country” list “Title” field, “City” column is “look up” field type that inherits the value from “City” list “City” field.
 
Cascading Dropdowns Using PowerApps
Img3. Custom list ”Employee Details”
 
Step 3
 
Go to the "Employee Details” list to the modern view. Now when inserting the new items, we can see after inserting country values in the “Country” field when we change the “City” field index, it shows all cities’ names. We will apply Cascading on “City” field. Cascading is nothing but apply filter conditions to show city names based on data selected on the “Country” field.
 
Cascading Dropdowns Using PowerApps
Img4. Before cascading apply all city names shows for selected country
 
Step 4
 
Now we will start Power Apps implementations. Go to list setting, Click on “Form Settings”. Now click on the “Customize in Power Apps” URL. It will open power app’s window. You can remove any fields just clicking on it and pressing the delete button.
 
Cascading Dropdowns Using PowerApps
Img5. Power Apps window
 
Step 5
 
Now we will need to add our list to a database. In our example, we are adding cascaded to “City” column. In our list “City” we had provided the all countries and its cities. Now we need to add our SharePoint generic list “City” to the database. Follow the below image to add the list to a database.
 
Cascading Dropdowns Using PowerApps
Img5. Steps to add a list to the database
 
Cascading Dropdowns Using PowerApps
Img6. Click on site URL links where list present
 
Cascading Dropdowns Using PowerApps
Img7. Click on list which you want to add
 
Step 6
 
Once the list is added to the database, we need to apply the filter formula. Just click on a field and unlock it.
 
Cascading Dropdowns Using PowerApps
Img7. Unlock field to apply the formula on formula bar
 
Step 7
 
Now we will add a formula on the “City” field to apply cascading.
 
Cascading Dropdowns Using PowerApps
Img8. Add formula on formula bar
 
Step 8
 
Click on F5 button or arrow mark on the toolbar tab to check the changes.
 
Cascading Dropdowns Using PowerApps
Img9. Now changing Country field value to USA shows cities name of USA
 
Step 9
 
Now we need to save our changes and publish them so that they can be worked on the list. To publish, click on the File tab, then goes to Save, add a version note then publish to SharePoint.
 
Cascading Dropdowns Using PowerApps
Img10. Add a version note
 
Cascading Dropdowns Using PowerApps
Img11. Publish to SharePoint
 
Step 10
 
Go to SharePoint list to see the results. Add new item. You can see changes are applied to the SharePoint list also.
 
Cascading Dropdowns Using PowerApps
Img12. Changes are applied to the SharePoint list