cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Madelman
Level: Power Up

Re: Populate dropdown in a card depending on the data in the dropdown of another one

Hi, I wanted to reply because the good response, was a little difficult to follow. So i wanted to highlight the exact issue, in a simplified manner when attempting to use Forgien Keys from an SQL Database. I want to select a value from Account Top Type and then have it cascade the drop down using the Account top type key, Forgien Key

 

These are my tables. Tables.png

 

The Default Issue with Power apps is how it sets your dropdown when setting up the control. 

2018-07-11 14_05_56-COA_TEST - PowerApps.png

In purple the Value drop down controls the displayed value of the drop down. The Items field controls what data is being pulled into the drop down, And also what columns you can work with. The default way Powerapps enters the values limits your ability to pass other data fields. Most likely, this is done to optimize the speed of an application.

 

Adjust your Items in the first drop down like so,

 

Adjusted.png

 

By removing the .Field you now will have access to all the columns in your dataset

 

On the secondary drop down we will end up writing a filter statement to limit the records by the first field. If we had not opened the dataset up on the first drop down. We would only find 2 values under the FirstDropdown.Selected method. Selected.Value and Selected.ACCOUNT_SUB_TYPE_DESCR (which was the display field of the first drop down)

2nd Drop down.png

 

 

 If I can make anything clearer please ask

Highlighted
Mayurs05
Level: Power Up

Re: Populate dropdown in a card depending on the data in the dropdown of another one

If you have multiselect dropdown values and you want to have conditional visibility you can use the following condition in visible property of that Card or whatever,

 

If(CountIf(DataCardValue.SelectedItems,Value="Selection Required")>0,true,false)

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,816)