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 Apps
Answered

Filter Help

(0) ShareShare
ReportReport
Posted on by 18

Hello Everyone

 

I have tried reading up on this issue but i can't seem to get anywhere with it, I am using a Gallery into another Gallery however i want to filter the results based on the selected item before hand.

I am making a inspection type app where there is a list of Sites and when i click on Site A i can then see every inspection that Site A has, When i click Site B i then get the list of inspections for Site B and so on.

These i am also looking to sort by date.

 

Here is as far as i can get

 

Filter(Inspections, StoreListGallery.Selected.Store) And SortByColumns(Search([@Inspections], TextSearchBox1_1.Text, "Date","Store"), "Store", If(SortDescending1, Descending, Ascending))

 

So the first list of sites are under the "StoreListGallery", these are assigned numerical numbers

In the second Gallery this is posted in "InspectionListGallery" i am wanting to see inspections for the selected number associated from the previous gallery. 

The list of all the inspections are in the table called "Inspections"

 

Thank you for all of your help

Categories:
  • Verified answer
    Slimeman Profile Picture
    18 on at

    So i got it to work,

     

    Here is the answer i got, i hope it does help someone. I'm going to write it out in terms that i understood

    The whole line - Filter(Table2, Table1 = GalleryFromTable1.Selected.Table1Variable)

     

    Breakdown

    Filter = The main command

    Table2 = This is the data source you want to filter

    Table1 = This is the datasource that you are taking input from to determine what you are filtering

    Galleryfromtable1 = This is the gallery that your user interacts with on the app. it needs to be what they interact on the screen prior to getting onto this new screen that we are working on

    Selected = This is the function that takes the users selection as a variable

    Table1Variable = This is the value that you are taking from the first data source that will be checked in your second table

     

    Example

     

    So for me i needed to get a Selection of Site A to display inspections for Site A only 

    So on sheet A i have 

    Data source - Sites

    Gallery - SiteList

    Variable - SiteNumber

     

    Sheet b i have

    Datasource - Inspections

    Variable - InspectionSiteNumber

     

    So my command is

    Filter(Inspections, Sites = Sitelist.Selected.SiteNumber)

     

    I hope this helps anyone looking to make sense of filters. If anyone has any advice to add that would also be appreciated as i am very new to Powerapps and if there is any tips it would be awesome to get them

  • Rohit Sharma354 Profile Picture
    Microsoft Employee on at

    That's great info ! Thanks for sharing.

     

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard