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 / Issue with Get Items f...
Power Automate
Unanswered

Issue with Get Items for SharePoint and Apply to Each Loop

(0) ShareShare
ReportReport
Posted on by

Hello everyone,

I am currently facing an issue with Power Automate and would really appreciate some help. Specifically, I am having trouble with the Get Items action for SharePoint and the Apply to Each loop.

The problem is that the Apply to Each loop will continue to run due to parallel flows, this happens because 1 of the 2 Start Flow on Document event being able to activate one of the flows and leave the other running. This is causing my flow to get stuck and not proceed further.

 

I was wondering if anyone knows of a solution to this problem. Is there any way to get rid of the Apply to Each loop so I can use the Terminate action instead? Any help or guidance would be greatly appreciated.

 

Thank you in advance for your help!

 

jiammar_0-1679580249428.png

 

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,707 Most Valuable Professional on at

    Just to be clear, this is a problem with parallel branches in a single flow, not parallel flows right?  The current loop will continue to run until both branches complete.  So there are a couple different things that you could be your problem.

    1) The parallel branches are independent from each other and only one should actually run to completion.  To fix that use a condition instead of parallel branches.  One branch goes in the yes side and the other in the no.  Then use some condition to decide which side runs

    2) because the second parallel branch runs a long time the Loop doesn't run any other loops.  If that is the case then go into the settings of the loop and enable Parallelism.  That will let you run up to 50 loops concurrently.  The individual loops won't finish any sooner, but they won't hold up the other loops.

     

    Terminate won't work because that will terminate the whole flow, not just the branch. If you need to run both branches but stop one early then I would suggest replacing the Apply to Each loop with a do Until loop. There are  ways to break out of a do until loop.

  • Community Power Platform Member Profile Picture
    on at

    Hello,

    Thank you for the response! 

    for 1) the issue here is that the start flow on document event doesn't have have way of knowing if that specific action was declined, it will only wait for the action to begin. So when the invite is sent out the person has 2 options, either to sign the document or to decline. However if the person is too choose one of the 2 options the flow does not know the other was rejected. I bypassed this before by adding a terminate to the end of the branch because that is the end of flow anyway and terminating it doesnt hinder any other actions. 

    2) I am not looking to have both loops run at the same time however only looking to run 1 based on the response of the signer, I looked into do until loop however im unsure what exactly set the condition of the do until.

  • Pstork1 Profile Picture
    68,707 Most Valuable Professional on at

    I'm not familiar with that particular connector, but I would think that something is returned by the Advanced Document Invite step that would show which path was accepted. That's really the only way to solve this problem since using a Terminate inside a loop will terminate the entire flow and prevent any other loops from running.

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard