Showing results for 
Search instead for 
Did you mean: 

Many on many filters from Multi-choice combo box

A question raised many times is filtering a gallery from a multi-choice combo box on a multi-choice field. This is a many-to-many filter. Depending on the data source, this may not be Delegable as the in operator is necessary, and also ForAll and Ungroup have lesser but existing limitations.
A gallery can be presented with a single filter searching for any item selected in the Combo Box existing in any of the values contained in the multi-choice field in the data source.
To do this, the ForAll() operator is needed to create a Table filtering the data source field for each of the selected values. This process results in a series of records that are themselves Tables with a single field Value, so Ungroup() is used to resolve the final list.
Also, allowance has been made for no entry in the Combo Box.

   Len(ComboBoxName.Selected.Value) = 0,
         ComboBoxName.SelectedItems As aSel,
            aSel.Value in MultiChoiceField.Value

hi, question my sharepoint are files and folders how can combine the filter (Filter(Documents,'Folder path' = "Shared Document/") and search (Filter(Documents, StartsWith('File name with extension', searchbox.Text)) into one command?