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 / How to filter status r...
Power Apps
Answered

How to filter status report records by selected project

(0) ShareShare
ReportReport
Posted on by

Hello Power Platform Community,

I am working with two main tables in my application:

1.) "Projects" table: This is where all my project records are stored.
2.) "Status Report" table: This contains all my status report columns and includes a lookup field named "Project" that is linked to the Projects table.

My objective is to create a gallery that, when a project is selected from the Projects table, only shows the status report records that are associated with that project. However, at the moment, my gallery displays all records from the "Status Report" table, regardless of which project is selected.

For example, if I select a project, I want the gallery to only display status report records like STAT-383 and STAT-372 along with their respective "Project Status Update" and "Created On' columns. Could you please help me understand how I could adjust my gallery to only display the status report records specific to the selected project? I have attached a screenshot below to illustrate the issue more clearly.

teach20_0-1688602665325.png

Here's my current code:

 

  • The Items property of the gallery is set to:  'Filter('Status Report'), 'Status Report(Views)'.'Active Status Report')'
  • The text input column (Status ID) in the gallery is set to: 'ThisItem.'Status ID'
  • The date picker column (Project Status Date) is set to: 'ThisItem.'Project Status Date''
  • The text column (Created On) is set to: 'ThisItem.'Created On''

Any suggestion or guidance on how to achieve this would be greatly appreciated. Thank you in advance for your help!

Categories:
I have the same question (0)
  • Verified answer
    Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    Hi @teach20 ,

     

    Based on your description I assume you are using Dataverse.

     

    Given you have already created a Relationship (I assume One-to-Many) between the Projects table and the Status table, you can leverage that relationship to Filter the Status Gallery based on the selected Project.

     

    As a basic example, let's assume you have a Combo Box control and in the Items property of that Combo Box, you have the Projects table. Let's also assume that the in the Field properties for that Combo Box, you have it to set to display each unique Project.

     

    With this mind, in the Items property of the Status Gallery, use:

     

    Filter(
     'Status Report',
     'Your Project Lookup Field'.'Your Project ID' = ComboBox1.Selected.'Your Project ID'
    )

     

    Or suppose for example you have another Gallery which is linked to your Projects table, you could use:

     

    Filter(
     'Status Report',
     'Your Project Lookup Field'.'Your Project ID' = GalleryParent.Selected.'Your Project ID'
    )

     

    Hopefully the above will provide you with some direction. Below are a couple of recent responses I have made for similar questions:

     

    How do I filter a data table in Power Apps to show... - Power Platform Community (microsoft.com)

     

    Solved: Re: Dataverse Lookup Tables and Canvas Apps Forms ... - Power Platform Community (microsoft.com)

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

    Imran-Ami Khan

     

  • teach20 Profile Picture
    on at

    Thank you @Amik. This solution worked! 

    Filter(
     'Status Report',
     'Your Project Lookup Field'.'Your Project ID' = GalleryParent.Selected.'Your Project ID'
    )

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 462

#2
WarrenBelz Profile Picture

WarrenBelz 425 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 291

Last 30 days Overall leaderboard