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 Child List item...
Power Apps
Answered

Filter Child List items only when a Parent list item is selected in an App

(0) ShareShare
ReportReport
Posted on by 218

Hi. I have 2 SharePoint Lists, Capability Workstream Overview as the Parent and Capability Workstream Activity Tracker as the Child. 

PaulRobbo1_0-1690889455180.png

 

PaulRobbo1_1-1690889505009.png

In the App, I want only the Activity relating to the Overview record to display so if I I have not selected a record, nothing displays and if for instance I select SFR on the left, only the Activity related to SFR will display on the right. Can anyone help, been trying different things for a while.

PaulRobbo1_2-1690889712589.png

Thanks in advance.

 

 

 

Categories:
  • Verified answer
    Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @PaulRobbo1 - if you want just to filter the Workstream Activity Gallery (Child) based on the selected item from the Capability Workstream Overview Gallery (Parent), try a basic pattern like below: 

     

    Simple method:

     

    Filter(
     'Your child data',
     'Your common field' = 'Your Parent Gallery'.Selected.'Your common field'
    )

     

     

    Another method:

    1. On the OnSelect property of the Capability Workstream Overview Gallery (Parent), enter

     

    Set(ThisSelectedItem,ThisItem.'Your common field')

     

     

     

    2. In the Items property of the Workstream Activity Gallery (Child), enter:

     

    Filter(
     'Your child data',
     'Your common field' = ThisSelectedItem
    )

     

     

    3. Set the Default property of the Capability Workstream Overview Gallery (Parent) to:

     

    {}

     

     

     

    4. (Optional), set the OnVisible property of the Screen to:

     

    Reset('Your Parent Gallery');
    Set(
     ThisSelectedItem,
     Blank()
    );

     

     

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

     

    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

  • PaulRobbo1 Profile Picture
    218 on at

    Thanks for the quick reply. I added that to the On Select field and got this:

    PaulRobbo1_0-1690890560356.png

    I assume it goes in the On Select??

     

  • PaulRobbo1 Profile Picture
    218 on at

    PaulRobbo1_1-1690890637578.png

     

  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    Hi @PaulRobbo1 ,

     

    I think you taken my example code and literally pasted it into your App. I have edited my previous post to make it clearer what you need to do.

     

    Looking at your screenshots, I am assuming the "Workstream Name" field is the common field which "links" both lists. 

     

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

     

    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

  • PaulRobbo1 Profile Picture
    218 on at

    Sorry for being a bit dim but I have it now and it works great. Thank you so much.

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 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard