cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SamEll
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
RezaDorrani
Dual Super User II
Dual Super User II

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
RezaDorrani
Dual Super User II
Dual Super User II

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

Thank you for this!

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

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
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 Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (31,613)