cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
J0el
Helper I
Helper I

Filter Gallery where Collection values match Choice column values

Hi there,

 

I have a collection with one column. The values in the column are determined by the user's selection at a previous point in the app.

There is a SharePoint List Choice column (Not Multi-Choice) that contain the same values that would appear in the collection.

 

I want to filter a gallery based on the items that are matched from the collection on the Choice column. 

So for example:

 

If Collection contains: "Apple", "Pear", "Orange". The Gallery is filtered on the choice column that has those choices set for each record.

 

I have this, in which the syntax is correct, but it doesn't seem to filter the gallery items at all:

Filter('Inhaler data for app', 'Overarching Drug Class'.Value <> "SABA" &&
Concat(ActivityCollection2,Value&",") in Concat('Drug Class',Value&","))  <----Adding this doesn't do anything

 

TIA

 

Joel

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@J0el 

Yes, your filter statement will never match anything properly.

Please consider changing your Formula to the following:

Filter('Inhaler data for app', 
    'Overarching Drug Class'.Value <> "SABA" &&
    'Drug Class'.Value in ActivityCollection2.Value
)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

2 REPLIES 2
RandyHayes
Super User
Super User

@J0el 

Yes, your filter statement will never match anything properly.

Please consider changing your Formula to the following:

Filter('Inhaler data for app', 
    'Overarching Drug Class'.Value <> "SABA" &&
    'Drug Class'.Value in ActivityCollection2.Value
)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Superb, thank you!

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (3,651)