cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to filter a gallery with multiselect combobox

Hi all,

 

I have a sharepoint list with a Choice-column called "Practice" it has 11 different choices. I wish to filter a gallery based on the choices, but I would like to use a combobox to choose different "Practices" and sometimes more than one:

 

FilterProblem1.JPG

 

 

I have found the IsMatch() function. However, I am experiencing some issues with the function. I can write the below formula:

Practice.Value = IsMatch(cbPracticeFilter.Selected.Value, "",Contains)

 

But ideally, what I want is to filter so that ALL the choosen from cbPracticeFilter (the combobox) should be matched towards the Practice.Value.

 

How do I do that? Is there another way to do this in an easier way?

 

1 ACCEPTED SOLUTION

Accepted Solutions
eka24
Super User III
Super User III

Try:

Filter(Datasource, Practice in cbPracticeFilter.Selected.Practice)
 
OR
If(IsEmpty(cbPracticeFilter.SelectedItems),Datasource,
Filter(Datasource, Practice in cbPracticeFilter.Selected.Practice))
 
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

2 REPLIES 2
eka24
Super User III
Super User III

Try:

Filter(Datasource, Practice in cbPracticeFilter.Selected.Practice)
 
OR
If(IsEmpty(cbPracticeFilter.SelectedItems),Datasource,
Filter(Datasource, Practice in cbPracticeFilter.Selected.Practice))
 
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

RickJ
Frequent Visitor

This works for a single selection in a combobox, but if multiselect is turned on and multiple are select it only returns results for the last selection, not all selections.

 

Any further help, I figure it would need a ForAll or something to loop through all the selections of the combobox.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,665)