cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Filtering gallery by multiple selected items in combobox

Hi all,

 

I am currently trying to filter my gallery based on data in a SharePoint list. The column I want to filter by is a multiple select choices column. My current code is: 

If(!IsEmpty(ComboBox.SelectedItems),Filter('Sharepoint List',ComboBox.Selected.Value in Topics.Value),'Sharepoint list')

 

Currently this filters the gallery by SelectedTopic1 and SelectedTopic2 and SelectedTopic1&SelectedTopic 2, but I only want to see results for SelectedTopic1&SelectedTopic2 - is there any way to do this? I've tried ComboBox.SelectedItems / ComboBox.SelectedItems.Value in Topics.Value but I get an error saying "Cannot use Table values in this context"

 

Thanks in advance for any advice

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: Filtering gallery by multiple selected items in combobox

Hi @SamEll 

 

If you want to implement thsi with delegation

https://www.youtube.com/watch?v=44j2VRbdWjk

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

4 REPLIES 4
Highlighted
Dual Super User
Dual Super User

Re: Filtering gallery by multiple selected items in combobox

Hi @SamEll 

 

If you want to implement thsi with delegation

https://www.youtube.com/watch?v=44j2VRbdWjk

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Highlighted
Frequent Visitor

Re: Filtering gallery by multiple selected items in combobox

Thank you for this!

Highlighted
Frequent Visitor

Re: Filtering gallery by multiple selected items in combobox

Hello,

 

I am using your method and grouping all the items. However if I want to reset the combobox the Gallery«s items just disappear and then I need to select any of the combobox choices and then unselected it/them to make the Gallery display all values. Do you have any idea why this happens?

 

To unselect the values from the combobox should be the same effect as the function of reset the combobox, however with this method it has different outputs and I still haven't figured out why.

 

Thanks in advance.

 

Regards,

Pedro Pereira

Highlighted
Helper II
Helper II

Re: Filtering gallery by multiple selected items in combobox

So I attempted Reza's method on my gallery and it ALMOST worked. I'm not sure why but I have a table in Sharepoint with two columns. 

 

Column 1 is Email address (Title Column)

Column 2 is a multiple select Choice Column called Problem Description

 

I used a flexible gallery in my powerapps and the goal is to select the choices from a combobox that will filter the email addresses based on the Problem Description that we can then copy to an email. The formula is working for all but one problem description "Non-Emergency" however, if I select "Emergency" and "Non-Emergency" I get the correct values for both. If I deselect "Emergency" and the list of 10 "Non-Emergency" emails display. But if I only select "Non-Emergency" only one email displays. 

 

I added this to the visible property of the label:

"Yes" in Concat(ForAll(cmbCCFilter.SelectedItems.Value, If(Value in ThisItem.ProblemDescription.Value,"Yes","No")),Value)

 

I'm not sure where I'm going wrong on this. Any help would be greatly appreciated!

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (6,335)