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 / If the next action can...
Power Automate
Unanswered

If the next action can't be performed go back to the beginning of the loop

(0) ShareShare
ReportReport
Posted on by

Well, I'm having a hard time here as a new user of Power Automate Desktop. I've created this loop to perform multiple clicks to complete a single action. However, in step #21, when the filtered value is not a valid entry, the next action (#22) cannot find anything to click on. What can I do so that, when this happens, my flow moves on to the next value and restarts the loop?

 

blackstones17_0-1698854926623.png

 

I have the same question (0)
  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Each action has an on-error action.  I see the onblock error, but you can drill down into the action on #22, and in the bottom left hand corner is an "On Error" button and you can specify where to go after:

     

    MichaelAnnis_0-1698855871589.png

     

     

    Many people will put a Label either up above the part they want to retry, or down near the end of the loop to skip to the next loop.

     

    Example:

     

    Loop (start)
        Label Start
        'do something - on error, Go To Label - Start

    End (loop)

     

    OR

     

    Loop (start)

        'do something - On Error, Go to Label - Skip

        Label Skip

    End (loop)

     

    Good luck!

  • UshaJyothiKasibhotla Profile Picture
    203 Moderator on at

    Create a label above for each

    Click on error on that activity for the step #21

    Then select continue flow run 

    Select go to label 

    And you can select lebel 

    UshaJyothi20_0-1698860050548.png

    Hope this helps 

    Usha

     

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    There are several ways of doing it. But you need to make sure that you do not go to the beginning of the loop, as that would restart the current item, and, as such, would put your flow in an infinite loop on the erroneous item. Instead, you must go to the end of the loop, effectively skipping the remaining actions within the current iteration, and move on to the next one.

     

    You can either use an On block error action and put all of the actions inside the loop within the block. Then make the block continue the flow run on error and go to the end of the block:

    Agnius_0-1698900953235.png

     

    This will handle all errors on all actions, though. If you only want to do this on the one particular action, you will need to create a Label at the end of your loop and then use the "On error" rules of the Click link on web page action as @MichaelAnnis suggested above.

     

    Alternatively, you can also use a If web page contains action to check if the link exists before clicking on it. If it doesn't, you can use the Next loop action to skip any further actions and move to the next iteration.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

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