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é? 🙂
Solved! Go to Solution.
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,
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.
Dropdown 1
Distinct(Tabel1;Kat)
Drop-down 2:
Filter(Tabel1; Kat= DropDown_Kat.Selected.Value)
Additional resource video
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,
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
User | Count |
---|---|
257 | |
110 | |
90 | |
51 | |
44 |