web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Answered

Org Chart Nested Loop

(0) ShareShare
ReportReport
Posted on by 108

Hey all, 

 

Been stuck at this problem for a while now and it's driving me crazy. 

I'm using "Get Direct Reports" (office 365 connector) and I'd like to one individuals name in and get all of their direct reports' indefinietely until there are none left and append them all to a list. 

 

The theory is simple but I'm having trouble implementing it. Any help would be appreciated

Categories:
I have the same question (0)
  • HenWang Profile Picture
    Microsoft Employee on at

    Hi @CameronTCD ,

     

    I am afraid there is no other way to avoid this issue. To conclude, adding enough number of nested loop to check whether the guy has direct reports or not is the final way.

     

    First part:

    HenWang_0-1683171366829.png

    check the first guy whether he has direct report.

     

    The following loop:

    HenWang_2-1683171568463.png

     

     

    Inside the condition, there are same configuration to check whether the specific user has direct reports.

     

    Best Regards,

    Hen Wang

  • Verified answer
    CameronTCD Profile Picture
    108 on at

    Hey @HenWang thanks for taking the time to reply.

    After a lot of trial and error I managed to configure it in such a way that it works!

     

    With a combination of a few variables, a loop and two for each the Flow will drill down from one individual and find every single person under them organisationally.

    first stepfirst stepsecond stepsecond stepthird stepthird step

  • DR-30071856-0 Profile Picture
    2 on at
    Thanks for providing the example, I'm trying to do something similar.
     
    Could you please expand on the setp: "How many direct reports does this person have?".

    I don't quite get what you are doing here. Thanks 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard