Hi,
I'm filtering my gallery using multiple combo boxes and text inputs. The code looks like this:
Filter(Database,
StartsWith(Category1, TextInput1.Value) And
StartsWith(Category2, TextInput2.Value) And
StartsWith(Category3, TextInput3.Value) And
StartsWith(Category4, TextInput4.Value) And
StartsWith(Category5, TextInput5.Value) And
StartsWith(Category6, TextInput6.Value) And
StartsWith(Category7, TextInput7.Value) And
StartsWith(Category8, TextInput8.Value) And
StartsWith(Category9, TextInput9.Value) And
StartsWith(Category10, TextInput1.Value) And
(Category11 = ComboBoxInput1.Selected.Value || IsBlank(ComboBoxInput1.Selected.Value)) And
(Category12 = ComboBoxInput2.Selected.Value || IsBlank(ComboBoxInput2.Selected.Value)) And
(Category13 = ComboBoxInput3.Selected.Value || IsBlank(ComboBoxInput3.Selected.Value)) And
(Category14 = ComboBoxInput4.Selected.Value || IsBlank(ComboBoxInput4.Selected.Value)) And
(Category15 = ComboBoxInput5.Selected.Value || IsBlank(ComboBoxInput5.Selected.Value)) And
(Category16 = ComboBoxInput6.Selected.Value || IsBlank(ComboBoxInput6.Selected.Value))
)
Where Categories 1-9 is numeric, and 10-16 is text values or strings. The datasource I'm using is a Sharepoint list.
Does anybody know if I can do this more efficiently?