web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filtering a Gallery ba...
Power Apps
Unanswered

Filtering a Gallery based on values from a Detail Form

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Community,

 

I am currently making an app, where I am using several galleries and detail screens.

 

For this, I am using two tables; table1 & table2. My first Gallery is using table1, to show values from a column called Initiatives. When clicking the arrow button, navigating to the first detail screen, I want there to be another gallery on this screen. A the moment, I have added the gallary here, which gathres information from table2, also a column called initiatives, but it is filtering on a column called Supplier.

Capture.PNG

 

It might sound confusing, but i'll try to explain it thoroughly. The three pieces of information on the top, is based on my first selection, which is that specific Initiative. Under this specific Initiative, there are a few different savings that have been recorded, and they are distinguished by the relevant supplier. So, my wish, is that when I click into a specific Initiative (and end up on the screen above), the gallery below should show the different savings under that specific Initiative. Could be 1 card, could be 5, could be 10, depends on how many recorded savings there are. My issue right now, however, is that I cannot get the correct syntax. In the gallery title called Supplier, I am using the following function.

LookUp('[dbo].[table2]';Initiative=DataCardValue3.Text;Supplier)

And for the subtitle and body I am using the same, just with the return value as Department & Saving.

 

The above function only gives me the same information all the way down, and there are hundreds of cards in the gallery, and it should obviously only show the amount of cards = amount of recorded savings.

 

Just for clarification, the reason why I am using two different tables (From SQL), is because they are in different levels. But that shouldn't be the issue.

 

I hope that you will understand my question, and be able to aid me in solving this.

 

Thanks in advance! (Please disregard my name, this has nothing to do with Dropdown boxes)

Categories:
I have the same question (0)
  • anees Profile Picture
    250 Microsoft Employee on at

    Hi @Anonymous

     

    LookUp only returns one record. You should be using Filter to get a collection of records.

     

    Also instead of referencing the DataCard directly you should be using the Selected property of the Gallery to get the Selected record from the first gallery.

     

    Please set Items of Gallery2 to a Filter expression. Something like this:

    Gallery2.Items = Filter(Table2, Supplier = Gallery1.Selected.Supplier)

     

    Then using the field pane for Gallery2, set Title = Supplier, Subtitle = Department, Body = Savings

     

    Thanks

    Anees

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard