Populate a Dropdown Based on the Value of Another Dropdown in PowerApps
If you’re new to PowerApps, be sure to read my brief introduction to PowerApps HERE
In this session, I’ll show you how to setup a series of drop-down menus were the list of available values is based on the value selected in the first dropdown
Start by creating a new screen, and creating a Connection to a Data Source which contains your list of available value combinations
Content à Data Sources
Add Data Source
Select your Connection (or create a new one)
Select the table(s) containing your values. Ensure your table has a Primary Key
And Connect
My table has three fields
ID | ParentReason | ChildReason
Back on your PowerApps Screen, add a dropdown menu
Insert à Controls à Drop Down
Give your Dropdown a more meaningful name. Select the Content tab, select ‘Dropdown1’ (or similar) and rename.
I named mine ParentReasonDrop
Set the Items Parameter to select the relevant list of Parent Values from your table. In my case, I needed to specify DISTINCT values
Distinct('[dbo].[ReasonCodes]',ParentReason)
Now, add a second Dropdown menu, and give it a name – I went with ChildReasonDrop
For this one, set the Item parameter to bring back a dataset filtered based on the value of ParentReasonDrop
Filter('[dbo].[ReasonCodes]',ParentReasonDrop.Selected.Value in ParentReason)
So here, we’re filtering the ReasonCodes table, where the ParentReason matches the selected value in ParentReasonDrop.
And that’s all there is to do – and of course you can continue with multiple sub-menus if you so wish.
I have noticed you don’t monetize extrobe.co.uk, don’t waste your
traffic, you can earn extra bucks every month with new monetization method.
This is the best adsense alternative for any type of website
(they approve all sites), for more details simply search in gooogle: murgrabia’s tools