I need to filter Power Apps gallery with a multi-select choice column in SharePoint.
I am finding myself at wits end and need some help.
In the below example, i need to filter the gallery (List1) using a combo-box (Column1) with the source as a multi-select choice column.
I would be grateful if you help me with the code.
Filter( yourlist, yourchoicecolumn.Value in ComboBox2.SelectedItems.Value )
If you want the list to show all the items if the combobox is blank then
Filter( yourlist, Len(ComboBox2.Selected.Value) = 0 || yourchoicecolumn.Value in ComboBox2.SelectedItems.Value )
yourchoicecolum.value gives an error message which says - "Invalid argument type. Cannot use table value in this context"
You have a many-to-many filter here - the below is not Delegable (and you cannot make it so), but try this
If( Len(Combo2.Selected.Value) = 0, List1, Ungroup( ForAll( Combo2.SelectedItems As aSel, Filter( List1, aSel.Value in Column1.Value ) ), "Value" ) )
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Keep up to date with current events and community announcements in the Power Apps community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!