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 / PowerApps Nested Galle...
Power Apps
Answered

PowerApps Nested Gallery Filtering

(0) ShareShare
ReportReport
Posted on by 175

Hi all,

 

Question about filtering a gallery within a gallery in PowerApps. Here's the scenario:

 

I have a grid-like gallery that contains 10 different workstations as the respective items. Furthermore, within each of these items, I have attached a gallery within each that contains build records for that specific workstation. The problem is that the underlying data source has the build records all in one table with a "Workstation" column rather than having separate data sources. I would like to filter the inner gallery by the parent gallery "Title" text item label control. I am not sure if this is possible, but I cannot seem to find any documentation on the syntax needed for this. 

 

Thanks,

Farhan

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,925 on at
    How many galleries do you intend to build. Table name and columnName will help. Kindly watch this video from Shane Young
    https://youtu.be/nlhWQg03TL0

    If you like this post give thumps up. If it resolved your question then mark as a solution
  • Verified answer
    GarethPrisk Profile Picture
    2,828 on at

    When a Gallery is nested within a Gallery, there are some syntax specifics to note.

     

    The nested gallery will have a ThisItem context, which represents the row for the nested table.

    • Used like an other gallery, to access the contextual Row and its field values

     

    HOWEVER, the Items property (and maybe others), has a different Context for ThisItem

    • Here, ThisItem refers to the top gallery row, which the nest gallery is...well, nested
    • This means you can access the parent gallery row to
      • Use it for filtering
      • Use a table attribute (like a child relationship) as the source of records

     

    In a default CDS instance, for example

    • Create a canvas app
    • Add a Gallery, Items = Accounts
    • Add a nested Gallery, Items = ThisItem.Accounts

    The nested gallery above will be populated with the child records (via Parent Account relationship), of the Account in that row.

     

    For yours, you may have to configure the nested gallery with a different data source, but you can at least apply a filter such as

    • Filter(Table, Workstation = ThisItem.Workstation)
  • Olivia_Dudley Profile Picture
    55 on at

    Thank you @GarethPrisk! I was wondering what the syntax would be for a gallery nested in a form? I can create a related gallery outside of the form with the same syntax you used, but not inside a form's custom card. I have tried testing by hard-coding the ID value, but I'm wondering if I should not be using Filter function since the literal is not accepted. (Tested both inside and outside fo the form. Works outside, not inside.)

  • GarethPrisk Profile Picture
    2,828 on at

    @Olivia_DudleyI am not sure that you can embed a Gallery control within any part of a Form control, unfortunately. The Gallery will exist outside the context of the form.

    That being said, there are some overlapping properties between a Form and a Gallery which we can leverage. My assumption is that you are trying to show related records, for the record being displayed in the Form - is this correct?

    If so, let's assume:

    • We have an initial Accounts Gallery (galAccount)
      • Items = Accounts
    • We have an Account Form (frmAccount)
      • DataSource = Accounts
      • Item = galAccount.Selected
    • We add an additional Gallery for Child Accounts (galChildAccounts)
      • DataSource = Filter(Accounts,'Parent Account'.Account = galAccount.Selected.Account)

    As you can see, both the Form's Item and the second Gallery's Filter are using the selected Item from the first Gallery.

    I would go a step further and turn galAccount.Selected into a context or global variable, to help performance.

  • Olivia_Dudley Profile Picture
    55 on at

    Alas, this is as I figured. My form has tabs which shows data cards based on the tab selected. It appears the solution of creating the gallery outside with similar visible settings will suffice.

     

    Thanks again!

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 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard