Hello good afternoon. I have two drop-down fields and would like to make the following query
How can I restrict that if in the X field the user selects "100", only the options 101,103 and 104 are shown in the Y field ?
Thank you !
Solved! Go to Solution.
Hi @elaaadani
Switch(
Dropdown1.Selected.x,
"1000",
Filter(
Table2,
y * 1 < 1050
),
"2000",
Filter(
Table2,
y * 1 > 1999 && y * 1 < 3000
), etc.
)
worked perfectly for me. I like to use * 1 instead of Value() to convert text to numbers. It is a shortcut and easier to see in formulas.
Hi @elaaadani
Your text and your screenshot don't match but I will assume you mean 1000 and 1001, 1003 and 1004.
You would use the Switch() function as follows as the Items property of the dependent dropdown as follows:
Switch(Dropdown1.Selected.Value,"1000", Filter(list2, y <=1004),
"2000", Filter(list2, y>1004 && y <1100),
"3000", Filter(list2, y>=1100 && y <1200), etc,
)
Thank you very much for responding to me
I have some doubts.
The information in the drop-down lists comes from an excel table.
Drop-down 1 is filled with elements from table 1 and drop-down 2 from table 2, as I leave in the image for you to understand.
In that case, how can I implement this? since I get errors even when trying to use "Value" for both the filter and the switch
Thank you in advance
Hi @elaaadani
Switch(
Dropdown1.Selected.x,
"1000",
Filter(
Table2,
y * 1 < 1050
),
"2000",
Filter(
Table2,
y * 1 > 1999 && y * 1 < 3000
), etc.
)
worked perfectly for me. I like to use * 1 instead of Value() to convert text to numbers. It is a shortcut and easier to see in formulas.
For some reason it doesn't work for me.
I have this in the formula when you select the element
Table 1 = First table from excel
Table 2= Second table from excel
Soc_1 = First Dropdown
Org_1= Second Dropdown
Switch(
Soc_1.Selected,
"1000",
Filter(
Table2,
Org_1 * 1 < 1050
),
"2000",
Filter(
Table2,
Org_1 * 1 > 1999 && Org_1 * 1 < 3000
)
)
Thanks !
The only problem I see is that you have not indicated the name of the column selected. If you put a "." after Selected, does Intellisense indicate a choice?
If I select 1000 in the drop-down list 1, should I specify the column in the excel table where the information comes from ? That is to say
Soc_1.Selected.Table1, "1000" ?
What is the column name in your Table1
Table 1: Soc.
Table 2: OrgC
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
164 | |
94 | |
64 | |
63 | |
61 |
User | Count |
---|---|
236 | |
162 | |
95 | |
83 | |
81 |