Creating cascading dropdowns in Power Apps can significantly enhance the user experience by filtering options based on previous selections.
Here’s a step-by-step guide to help you set up this.
Perquisites
Use a SharePoint list or any other data source to store your hierarchical data (Master Data).
I am going to demonstrate cascading dropdown functionality using the following controls.
- Dropdown Control
- Combo box Control
- Combo box with text box control
Dropdown Control
I used a Dropdown control to create a cascading effect. Based on the selected value in the Segment dropdown, the Country dropdown will be filtered. Then, based on the selected value in the Country dropdown, the Product dropdown will be filtered. Finally, based on the selected value in the Product dropdown, the Sale Price textbox will be set.
Note. Source Master lists all columns as single-line text.
Destination Try list structure is as follows: all columns single line text except Sale Price Currency Data type.
- Segment Dropdown Configuration
- Country Dropdown Configuration
- Product Dropdown Configuration
- Sale Price Text box Configuration
2. Combo box Control
Let's see how to do Cascading dropdown using combo box control, code will remain the same only the control will change in this case.
Note. The database master table named VisTbl_Country_States has the table schema below from which we are fetching cascading data.
- Country Combo Box Configuration
- States Combo Box Configuration
- Latitude Text Box Configuration
- Longitude Text Box Configuration
- Data Table Filter
3. Combo box with text box control
Here I use the combo box to best fit to search among 195 countries from the data source.
The rest of Capital & Currency are text filed where auto fetch value will be saved based on country selection
Master List Structure
All columns are single-line text.
- Combo Box Configuration
- Capital Text Box Configuration
- Currency Text Box Configuration
- Precautionary Note
- Save the form data to the destination data source as a single-line text column type to avoid data type conversion issues.
- If the “Allow Searching” option keeps turning off automatically, save your Power Apps, close it, and then reopen it, this will fix the issue.
Thanks for reading the blog.
I hope this makes it clearer!