cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ZowieS
Advocate II
Advocate II

Cascading dropdowns - No result from 2nd level

Hi,

I've been searching around (both here and on Google) for an answer but I haven't found it yet and I hope you can help me.


Problem
I have two drop-downs and I want the second one to be depended of the first one but the drop-down list is empty.

Code:
Drop-down 1: Sort(Distinct(Tabel1;Kat);Result)
Drop-down 2: Distinct(Filter(Tabel1; Omr = DropDown_Kat.Selected.Result); Omr)

 

If I write Drop-down 2 as: Distinct(Filter(Tabel1; Omr = DropDown_Kat.Selected.Value); Omr) I get the error: Invalid Argument

 

Any idé? 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @ZowieS ,

Do you want to :

1)drop down1: display non-repeating Kat field value?

2)drop down2: filter table based on the selected Kat value in drop down1 and display non-repeating Omr field value?

If so, please try this:

set drop down1's Items:

Sort(Distinct(Tabel1;Kat);Result)

set drop down2's Items:

Distinct(Filter(Tabel1;Kat= DropDown_Kat.Selected.Result); Omr)

//Firstly, drop down1 display Kat filed value, so the filter condition should be: Kat= DropDown_Kat.Selected.Result

Secondly, The result of Distinct function is a table with a field named Result.

So you need to use “DropDown_Kat.Selected.Result” the represent the selected kat value in drop down1.

 

 

If the problem still exists, please tell me the data type of Kat field and Omr field.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
MrNappa
Advocate V
Advocate V

You're probably using the wrong filter parameter. Remember, you're filtering on the Id value. I'm guessing it's probably something like " Filter(Tabel1; Omr.Omr = DropDown_Kat.Selected.Omr) " instead.

eka24
Super User III
Super User III

Dropdown 1
Distinct(Tabel1;Kat)

Drop-down 2:
Filter(Tabel1; Kat= DropDown_Kat.Selected.Value)

Additional resource video

https://youtu.be/pkZG2boN7jQ?t=24

v-yutliu-msft
Community Support
Community Support

Hi @ZowieS ,

Do you want to :

1)drop down1: display non-repeating Kat field value?

2)drop down2: filter table based on the selected Kat value in drop down1 and display non-repeating Omr field value?

If so, please try this:

set drop down1's Items:

Sort(Distinct(Tabel1;Kat);Result)

set drop down2's Items:

Distinct(Filter(Tabel1;Kat= DropDown_Kat.Selected.Result); Omr)

//Firstly, drop down1 display Kat filed value, so the filter condition should be: Kat= DropDown_Kat.Selected.Result

Secondly, The result of Distinct function is a table with a field named Result.

So you need to use “DropDown_Kat.Selected.Result” the represent the selected kat value in drop down1.

 

 

If the problem still exists, please tell me the data type of Kat field and Omr field.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

ZowieS
Advocate II
Advocate II

Hi,

Thank you all for your replies! 😁

I was blind yesterday from sitting with this to much but it's working now after I change
From: Distinct(Filter(Tabel1;Omr= DropDown_Kat.Selected.Result); Omr)
To: Distinct(Filter(Tabel1;Kat= DropDown_Kat.Selected.Result); Omr) 

 

Cheers,
Zowie

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (50,068)