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 / Direct Reports - colle...
Power Apps
Unanswered

Direct Reports - collection within a collection

(1) ShareShare
ReportReport
Posted on by

Is there a way I could create a collection within a collection?  For example:

 

ClearCollect(
 myReports,
 Filter(
 Office365Users.DirectReports(_varMyEmail),
 AccountEnabled = true
 )
);

 

 It should give me all email directly reporting to me.  But if my manager is viewing the app, she should see everyone directly reporting to her including staff directly reporting to each of her staff. 

So if my staff Employee 1 & 2 are both managers with 5 staff each.  When I view the app, the gallery should display Employee 1 & 2 + 10 staff.

Categories:
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Tamras 

     

    Try this high level approach

     

    Use AddColumns to merge two collections. Similar discussion: Merge one collection with another 

     

    The generic approach above could work if adapted to your case.

  • Aethyta Profile Picture
    on at

    @poweractivate Thanks. I'll test this soon. I'm currently testing another solution from another post. But I will definitely post back the results later.  

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Tamras 

     

    You can follow these threads to get a list of all the direct and indirect staff members for a specific user:
     
    Hope this Helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Tamras 

     

    You can also try something like this (from Direct Reports and Indirect/ Subordinates in powerapps 😞

     

    From one button:

    ClearCollect(
    DirectReports,
    Office365Users.DirectReports("YourManagerEmail")
    )

     

    Set the OnSelect proeprty of the "InDirect Reports" button to following:

    Clear(InDirectReports);
    ForAll(
    DirectReports,
    Collect(InDirectReports, Office365Users.DirectReports(Mail))
    )

     

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    @Tamras 

     

    If you would go to the links provided in my response, you will be able to understand the whole process of what is going on in this case. A well explained solution is provided on the thread.
     
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. 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

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard