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 / For Each - INCREASE Cu...
Power Automate
Answered

For Each - INCREASE CurrentItem variable without reaching END step

(0) ShareShare
ReportReport
Posted on by 145

Good day Everyone,

 

First, is this possible?

 

I'm trying to update something and i wanna do it through PA, everything is perfect just one step away from heaven.

 

The CurrentItem does not increase because it doesn't reach the END action because i placed a 'EXIT LOOP' right behind it. Is it possible to increase? or there's another way to make it without using foreach?

 

Capture.PNG

 

Please help.

  • UK_Mike Profile Picture
    on at

    Remove the " exit loop " surely ? then it will iterate through list...

  • Davidx23 Profile Picture
    145 on at

    UK_Mike

     

    Thing is i need to match the ID value with the CurrentItem Value in order to update it in DB.

  • UK_Mike Profile Picture
    on at

    Well ive no idea about Sql but that flow is doing exactly what you said to do, Exit the loop after 1 iteration.

    You could try a regular loop, specify the times to loop or loop to the List.count...

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Are you saying Exit Loop is taking it out of both loops, and not just the second Loop?

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Next takes is to the Next iteration, but End naturally does the same thing.

    Example:

     

    For each

    'Do something

    Next

    End

     

    For Each

    'Do something

    End

     

    They are the same thing.  Next is typically used when you are trying to skip the rest of the steps in the loop based on a conditional statement.

    Ex.

    For each

    If %CurrentItem.Name% = John

        Next

    End (if)

    'Do something (will only occur if %CurrentItem.Name% is not John)

    End (for each)

     

    Exit Loop cancels out a loop completely, so as I read it, you are telling it to only iterate once on the second loop, because you are telling it every time to exit this loop.

  • UK_Mike Profile Picture
    on at

    Just had a second glance at the screenshot, If theres only 1 file in the current item it would end anyway...🤔

  • Verified answer
    Davidx23 Profile Picture
    145 on at

    Guys,

     

    I did find the solution by my own, just rebuilt the flow and make the consult in a Store Procedure by its row's ID, updated the same way and that was bbq chicken.

     

    Thanks anyway and i'll share the flow if may be helpful for someone else.

     

    Capture.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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 231 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 217 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 170

Last 30 days Overall leaderboard