Hello,
I am trying to filter gallery based on multiple dropdowns... here the example on how I do with 2 dropdowns... now i have to do this with 3 and i hope that there is a better way to do this.... 😕
(gallery shows items from some list, the dropdowns should filter this list and represent the columns in that list)
//if category is selected
If(Not(IsBlank(category.Selected.Result)) And IsBlank(layout.Selected.Result),Filter('IT Hardware Web Shop - Products', Category.Value = category.Selected.Result And Availability.Value = "Available"),
//if layout is selected
If(Not(IsBlank(layout.Selected.Result)) And IsBlank(category.Selected.Result),Filter('IT Hardware Web Shop - Products', LayoutLanguage.Value = layout.Selected.Result And Availability.Value = "Available"),
//if both selected
If(Not(IsBlank(layout.Selected.Result)) And Not(IsBlank(category.Selected.Result)),Filter('IT Hardware Web Shop - Products', Category.Value = category.Selected.Result And (LayoutLanguage.Value = layout.Selected.Result Or LayoutLanguage.Value = Blank()) And Availability.Value = "Available"),
//if non selected
Filter('IT Hardware Web Shop - Products', Availability.Value = "Available"))))