Hi all,
I try to build a cascading drop down menu. For example I have two drop downs:
dpd_Category => Value defines the items in dpd_Filter
dpd_Filter => Values will be used to filter a column of a SharePoint list
The Items of dpd_Category are: ["None", "Color", "Size", "Type"].
No, if I choose a value, the items of the dpd_Filter should be filled with values of the corresponding column of the SharePoint List.
So, in the OnSelect of the dpd_Category property I have the following:
ClearCollect(
dpd_FilterGalleryItems,
{Result: "None"}
);
Collect(
dpd_FilterGalleryItems,
Switch(
dpd_FilterCategory.Selected.Value,
"Color",
Distinct(
[@lst_Devices],
Color
),
"Size",
Distinct(
[@lst_Devices],
Size
),
Distinct(
[@lst_Devices],
Type
)
)
)
The result is strange. The items of dpd_Filter sometimes are different numbers or the "Type", even if I do not choose "Type" in dpd_Category. So I think the switch does not work correct. I made a simple check, where I only put text into the switch and it worked.
Whre is my mistake with the SharePoint list. Any ideas?
Thanks and best regards,
Michael