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 Platform Community / Forums / Power Automate / Removing apply to each
Power Automate
Unanswered

Removing apply to each

(1) ShareShare
ReportReport
Posted on by 2

I am new to Power Automate and I somehow created a nested Apply to Each action but i need to remove the upper 2 actions. I have tried to just drag the lowest one out but keep getting the error "This action cannot be dragged out of foreach as it depends on an action inside foreach." I need the "Apply to each 5" to be right after the "Get items"  I have a bunch of sub actions in Apply to each 5 that I can't lose.


applyToEach.png

Categories:
I have the same question (0)
  • Verified answer
    v-jefferni Profile Picture
    on at

    Hi @MsnowWI ,

     

    You will not be able to drag out or copy the actions that within apply to each, please try:

    1. save the current flow.

    2. open the power automate portal on another tab:

        https://us.flow.microsoft.com

    3. create a new flow.

    4. copy parameters you need from the old flow and paste to the new one.

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Community Power Platform Member Profile Picture
    on at

    HI @MsnowWI ,

     

    You should always avoid nested flows!

     

    If you know that you will only ever have one item in the result of get items. Then you can avoid them:

     

    https://sharepains.com/2020/09/17/unwanted-apply-to-each-power-automate/

     

    Other ways to void them include using a select action when you are processing data. So that you massage the data into a single level array first.

     

    You can also sometimes use the method described in the post below:

     

    https://sharepains.com/2020/03/11/pieters-method-for-advanced-in-flows/

     

    it all depends a bit on what you are doing inside the apply to each steps.

     

  • agregoriades Profile Picture
    11 on at

    I figured out how to do it.  You have to remove all the references to other parts of the flow from the steps inside the for each.  Then you will be able to move them out.  Then you can put the references back in.  It's a pain, but better than rebuilding the whole flow from scratch.

  • Semisi Profile Picture
    2 on at

    Depending on how big your flow is, you can;

    1. Re-create the action before or after the apply to each box
    2. Add a parallel branch if it's the last step

    Copy it over then delete the Apply to Each box.

     

    Hope this helps.

  • buddyboy Profile Picture
    8 on at

    You have to drag the 2nd level Appy to Each to a "Add an action" or "Insert a new step" and the procced on to lower levels.

    I want to move the "Apply to each 7" from outside of the block of the "Apply to each 4". I need to move it to a new Action or Step. I need to also include the "Apply to each 5" in my moving.

    buddyboy_1-1697643080210.png

    As you can see in this illustration below the "Apply to each 7" & "Apply to each 5" is no longer inside the block of the "Apply to each 4" operation. You must drag the "Apply to each 7" to an "Add an action" or "Insert Step" that is outside of the block of the "Apply to each 4".

    buddyboy_2-1697643260349.png

     



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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard