cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Compare common elements in 2 Galleries and create a 3rd Gallery of the results

Hello Everyone!

 

I have 2 Galleries V1 and V2.

Both of the Gallery are linked to different Tables.

Both of the Tables have 2 Columns: Code and DName. (Same Name but different Values)

 

I want to filter (compare) both the galleries for the common DName elements and display it in a third gallery.

 

The third gallery should have common DName Elements from the 1st and 2nd Galleries.

 

Please keep in mind, that I am not talking about Tables, but Galleries (Since the Galleries already have some conditions set on them)

 

Thanks for the help! 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User II
Super User II

Re: Compare common elements in 2 Galleries and create a 3rd Gallery of the results

Here you go: 

 

I have 2 collections (corresponding to your tables) and then I have 2 galleries, each one's datasource set to one of these collections. Both these collections have a column DName. The other columns dont really matter. 

 

For the 3rd gallery, my Item property is set to: 

Filter(Gallery1.AllItems, DName in Gallery2.AllItems.DName)

 

It works exactly how you want. This is how the 3 galleries look:

 

FilteredGallery.PNG

 

Let me know if this isn't what you are looking for and I can help further. 

 

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit Bhatia
https://www.thepoweraddict.com

View solution in original post

3 REPLIES 3
Highlighted
Super User II
Super User II

Re: Compare common elements in 2 Galleries and create a 3rd Gallery of the results

Here you go: 

 

I have 2 collections (corresponding to your tables) and then I have 2 galleries, each one's datasource set to one of these collections. Both these collections have a column DName. The other columns dont really matter. 

 

For the 3rd gallery, my Item property is set to: 

Filter(Gallery1.AllItems, DName in Gallery2.AllItems.DName)

 

It works exactly how you want. This is how the 3 galleries look:

 

FilteredGallery.PNG

 

Let me know if this isn't what you are looking for and I can help further. 

 

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit Bhatia
https://www.thepoweraddict.com

View solution in original post

Highlighted
Helper II
Helper II

Re: Compare common elements in 2 Galleries and create a 3rd Gallery of the results

Thank you so much Hardit! This is exactly what I wanted! 🙂

Highlighted
Super User II
Super User II

Re: Compare common elements in 2 Galleries and create a 3rd Gallery of the results

Glad I could help! Good luck with the rest of your app! Feel free to reach out in case of any questions!

Thanks,
Hardit Bhatia
The Power Addict
https://thepoweraddict.com

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

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 designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,455)