Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

How to display items in gallery when selected is used

Posted on 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
    punksterz626 on at
    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
    LaurensM 12,525 on at
    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
    punksterz626 on at
    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
    LaurensM 12,525 on at
    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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,297

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,890

Leaderboard