Skip to main content
Community site session details

Community site session details

Session Id : KW9PQ1JdVAlF1gsDUKrwao
Power Apps - Building Power Apps
Answered

How to display items in gallery when selected is used

Like (0) ShareShare
ReportReport
Posted on 19 Feb 2023 20:06:50 by

Hello, 

 

So I have two galleries, one is used for displaying/searching Name and the other layout is like an org chart with title, etc.

 

The syntax i used is Filter('Org Chart', Employee =Gallery1.Selected.'Reporting Manager') 

So if i select Mickey from the search Gallery1, this will display ONLY Bugs info. How do i display ALL, including the employees that also reports to Bugs. 

 

The datasource is a SharePoint list if that helps.

 

Thank you for the assistance.

 

EmployeeTitleReporting Manager
MickeySales RepBugs
DonaldSales RepBugs
MinnieAdminBugs
Categories:
  • punksterz626 Profile Picture
    on 21 Feb 2023 at 18:32:18
    Re: How to display items in gallery when selected is used

    Hello, sorry to bombard you with more questions when you already have been so helpful. I figure i'll ask here instead of creating a new thread. So what if want to create a navigate to a new screen with the direct report under that manager's name?

     

    So for Homescreen this is the syntax i will use to search the group the employee is in. Example "Bugs" Now i see Bugs is part of this particular group. 

    Filter(
     'Org Chart', 
     //Search for employees
     'Reporting Manager' = Gallery1.Selected.'Reporting Manager'

     

    Some of these employees within Bug's group, including Bugs, have direct reports. What i want is for when i select an employee from this Gallery1 with direct reports, all his employees will display. Can i do it on the same screen (Gallery1) or do i have to create a new screen and use the navigate function? 

     

    This is how the sharepoint List looks like. Keep in mind, Bugs name is listed under the Reporting Manager, but his record itself is not on here since Bugs report to a different manager if that make sense. 

     

    EmployeeTitleReporting Manager
    employee 1xxxxBugs
    employee 2xxxxBugs

    employee 3

    xxxBugs
    employee 4xxxBugs
  • Verified answer
    LaurensM Profile Picture
    12,510 Moderator on 19 Feb 2023 at 20:32:33
    Re: How to display items in gallery when selected is used

    Hi @punksterz626,

     

    In this case, we can remove the 'employee = ...' part to exclude the reporting manager from the overview:

    Filter(
     'Org Chart', 
     //Search for employees
     'Reporting Manager' = Gallery1.Selected.'Reporting Manager'
    ) 

     

    If this solves your question, would you be so kind as to accept it as a solution.

    Thanks!

  • punksterz626 Profile Picture
    on 19 Feb 2023 at 20:24:23
    Re: How to display items in gallery when selected is used

    This does work! However, after viewing the results I do not want the reporting manager listed with the rest of the employees since i have a separate gallery to view the reporting manager. How do i fix the syntax to exclude the reporting manager and only keep the group of employee he is part of? 

     

    thank you, again.

  • LaurensM Profile Picture
    12,510 Moderator on 19 Feb 2023 at 20:15:16
    Re: How to display items in gallery when selected is used

    Hi @punksterz626,

     

    In this case you will have to extend the Filter() to also filter by Reporting Manager.

    Filter(
     'Org Chart', 
     //Search for Bugs
     Employee = Gallery1.Selected.'Reporting Manager' ||
     //Or search for employees
     'Reporting Manager' = Gallery1.Selected.'Reporting Manager'
    ) 

     

    If this solves your question, would you be so kind as to accept it as a solution.

    Thanks!

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!