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 Automate / Dealing with 'apply to...
Power Automate
Unanswered

Dealing with 'apply to each' and not nesting beyond the 8 level limit

(0) ShareShare
ReportReport
Posted on by 2
Hi Power Platform Team,
 
I am struggling with the 'apply to each' action being added into my flow. 
 
I have a list and several 'list forms' to capture information for people requesting training, learning consultations, projects etc. (an L&D team). See image of flow attached. I have built this exact type of request system before but this time I have 2 fields with multiple selections turned on - the learner name(s) and the how the training need was identified. Both fields could be a single response or could be multiple and I want to allow for this. 
 
When I start adding the data in the first approval I immediately get these 'apply to each' things added and the approval is nested under.
I have this 'apply to each' for the following fields on each approval and email:
Learner(s)
Training need identification
Manager approval comments
Director approval comments
L&D approval comments
SLT approval comments
 
The problem here is that I have 4 approvals (each to a different level of manager) and after each approval I email the requestor and managers approving for their records. So every approval and every email is getting from 2-5 'apply to each' functions.
 
The data down the tree only lets me select the original field (learner name(s)) which just creates another 'apply to each' and my nesting issue presents, or I can select the 'current' item from the previous 'apply to each' but from my understanding that will only give me 1 name not all that are submitted in the form. I either exceed the nesting limit of 8 and have 'apply to each' functions absolutely everywhere and get a logic error and can't save or I only get 1 name from a potentially multi name field. I also get this 'apply to each' when I add the 'responses comments' field from an approval into an email or update the list. No idea why this would produce an 'apply to each' when it's a text field. 
 
Is there a way to avoid this or better control these? I'm really hoping there is a simple solution.
 
Thanks.
 
Power Automate Issue.JPG
Categories:
I have the same question (0)
  • VictorIvanidze Profile Picture
    13,081 on at
  • TR-12010518-0 Profile Picture
    2 on at
     
    I have seen this and like a lot of tutorials it only talks about removing the loop by having only 1 output. That defeats the entire point, I want to get all the names entered not 1 of them (first or last).
     
    Would love to figure out how. Only way I can think of is splitting the flow into 4 different flows so the nesting doesn't go over 8. 
  • Gyllentid Profile Picture
    894 on at
    Could this be a solution?
     
    If you initialize variable array, add the data you need form the apply to each (append to array), then in a separate apply to each under it you perform the action you need with the data in the created array. That way you can avoid some of the nesting.  

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 796

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 538

Last 30 days Overall leaderboard