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

Filter Gallery based on another Gallery

Hi, 

 

I'm stuck with this problem from a very long time and would appreciate some help. 

1. I have two galleries: Gallery 1 and Gallery2. 
2. Gallery2 is  filtered based on a certain logic. Gallery 2 has ID field called "ID2". 
3. I want to display just these items in Gallery1. I used the formula below: 

 

Gallery1 Items: Filter('Gallery1', ID1=Gallery2.Selected.ID2)

However, this returns just one result. I've more records in gallery 2 that should be displayed. How do I achieve this? What should be the formula? Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

I suggest you rather use the Datasource in the filter:

Gallery1 Items: Filter(Datasource, ID1=Gallery2.Selected.ID2)

I assume you have a column ID1 in the Datasource

------------

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
Super User III
Super User III

I suggest you rather use the Datasource in the filter:

Gallery1 Items: Filter(Datasource, ID1=Gallery2.Selected.ID2)

I assume you have a column ID1 in the Datasource

------------

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

Frequent Visitor

Thanks. This solution did not work but I found a workaround. 

I made a dropdown that collects the ID's from Gallery2. I also made a collection (CollectID) that collects ALL the ID's stored in dropdown and not just the one that is selected/default.


Now I used a formula Filter('Gallery1',ID1 in CollectID). Works smooth! 🙂

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

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

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (61,192)