cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
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.

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

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

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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (93,658)