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
Answered

Filtering a Gallery based on matching key with another gallery

(0) ShareShare
ReportReport
Posted on by 17

I have an app with a Gallery that references a SP list (SP List 1), and forms that can be used to modify or add new items to that SP list.  At the bottom of the "edit item" form that I created in the app, I have added another gallery that references related items from another SP list (SP List 2).  I would like the filter the items in this gallery to show only SP List 2 items that are related to the SP List 1 item that the user is editing.

 

So, user selects item 1 of SP List 1.  At the bottom of the form is a gallery of items from SP List 2 that pertain to the selected item in SP List 1 via a common key (i.e. Project ID =1, where there could be multiple items in SP List 2 that have been assigned Project ID = 1).

 

Getting the gallery to populate with items from SP List 2 is easy, but the filtering part is what I can't figure out.  Does anyone know the code for such a gallery filter?  Hopefully the ask makes sense and thank you for your time.

Categories:
I have the same question (0)
  • Power_Noob Profile Picture
    17 on at

    This is what I currently have and does not work:

    Filter('SP List 2,'Project ID' = 'SP List 1'.Selected.ID)

     

  • Verified answer
    WarrenBelz Profile Picture
    156,382 Most Valuable Professional on at

    Hi @Power_Noob ,

    You probably need

    Filter(
     'SP List 2,'Project ID' = 
     FirstGalleryName.Selected.ID
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Power_Noob Profile Picture
    17 on at

    That did the trick!  Thank you!

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

#2
11manish Profile Picture

11manish 205 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard