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 / Filter a list by anoth...
Power Apps
Answered

Filter a list by another list

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

So I'm making an app to keep documentation for all our customers network setups in a sharepoint site and then creating a front end for in it powerapps. The problem I'm having is getting page 2 of the app (a list of sites) to be filtered by the choice made on page 1 (a list of companies) the two lists are in a sharepoint site and were made in access with a relationship between 2 fields in each list. Here's how it's setup:

tblCompanies has it's primary key linked to the field "Company" in tblSiteDetails.

I want to select a company from the gallery on screen1 of the app and then have it filter the gallery on screen 2, showing only the sites belonging to the company I just picked on screen1.

Is there a simple piece of code I can use to do this or would it be a complicated feature? Any help would be great.

Thanks,

Corban

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Anonymous

     

    This should be pretty simple to setup.

     

    You can make use of this function:

    Gallery1.Selected

    Which will "know" which item is selected in first gallery and use it on the second screen

     

    Second Screen Gallery.Item should be this:

    Filter(tblSiteDetails, CompanyID = Gallery1.Selected.CompanyID)
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Anonymous

    After some playing around I found that doing it that way wasn't so simple as it didn't take the data from the selected field on screen 1. The way I got round it was by having a hidden label that gets the company ID that I want and then have the gallery get it's data from there.

     

  • huuthang Profile Picture
    25 on at

    I got an error when use "=" which say error argument type. 

     

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 339 Most Valuable Professional

#2
11manish Profile Picture

11manish 180

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard