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
Kudo Commander
Kudo Commander

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
Super User

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.
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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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