cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NabeelNQ
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
PowerAddict
Super User
Super User

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

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

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

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,951)