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 / Org Chart from local c...
Power Apps
Answered

Org Chart from local collection (without Office365 connector!)

(0) ShareShare
ReportReport
Posted on by 62

Hi everyone,

 I'm struggling with collecting direct and indirect reports without using the Office 365 connector (I have a solution with it in place but the performance is bad when collecting multiple levels). 

 

I do have a master collection (MergedPDC) with all employees (column name: 'Employee Name')  and their supervisor (column name: 'Supervisor Name') and their email address (column name: 'Email') . I want to collect all indirect reports of the current user of the app to show up in a gallery.

 

1.) Collect direct reports of the current user (testemail) -> working fine

 

ClearCollect(
DirectReports,
Filter(MergedPDC,'Supervisor Name'=LookUp(MergedPDC,Email=testemail).'Employee Name')

 

2.) collect all direct report of every direct report of step 1 -> here I'm struggling 

 

ForAll(
DirectReports,
Collect(
InDirectReports,
Filter(MergedPDC,'Supervisor Name'....

 

I want to filter all employees in the master collection with ,'Supervisor Name' = directreports.'Employee Name'

 

I am grateful for any advice!

 

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Christoph15 what have you tried?

     

    Have you tried

    ForAll(
     DirectReports,
     Collect(InDirectReports,
     Filter(MergedPDC,'Supervisor Name' = 'Employee Name')
     )
    )

     

     

  • Christoph15 Profile Picture
    62 on at

    yep and doesn't work -> I think as the logical test only compares the columns inside MergedPDC and not in relation to the DirectReports collection.

     

    to test:

     

    First(Filter(MergedPDC,'Supervisor Name' = 'Employee Name')).'Employee Name'   

     

    is empty

  • Verified answer
    Christoph15 Profile Picture
    62 on at

    I found a solution utilizing a gallery but no idea about directly working on collection level.

     

    Clear(InDirectReports);
    ForAll(
     Gallery1.AllItems,
     Collect(
     InDirectReports,
     Filter(
     MergedPDC,
     'Supervisor Name' = Title1.Text
     )
     )
    )

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 356

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard