web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / how can I clear failed...
Power Automate
Unanswered

how can I clear failed status of a flow inside loop

(0) ShareShare
ReportReport
Posted on by 34

I would like to update a dataverse table with device data, and only in case something changed. Also, If the record is not present I want to add it.

This is my current flow. If the Get row action fails, the device is not yet in our database, so I need to add it.

 

MartonVilmanyi_0-1701101859003.png

 

It does its job, but what bothers me is that the flow ends with "Failed" status. As far as I can see, the "error" here is handled, the flow should return success. Is it possible to somehow clear the failed flag inside the flow at this point? I am aware the "Terminate" action, but that only works at the end of the flow.

 

Or, how can I avoid even getting an error here and achieve the same functionality?

Categories:
I have the same question (0)
  • fchopo Profile Picture
    8,003 Moderator on at
    Re: how can I clear failed status of a flow inside loop

    Hi @MartonVilmanyi 

    You could add a Terminate action at the very bottom of the workflow (after conditions), and end it with success status value.

    Hope it helps!

    Ferran

  • MartonVilmanyi Profile Picture
    34 on at
    Re: how can I clear failed status of a flow inside loop

    Hi @fchopo that would return a green also if any other error happens inside the loop.

  • fchopo Profile Picture
    8,003 Moderator on at
    Re: how can I clear failed status of a flow inside loop

    Hi  @MartonVilmanyi 

    Which loop do you mean? (in the screenshot I don't see any). Could you detail your desired logic?

    1) If errors occurs in loop -> Return error

    2) If error occurs because item is not found -> Return OK

    Is that right?

  • fchopo Profile Picture
    8,003 Moderator on at
    Re: how can I clear failed status of a flow inside loop

    Hi @MartonVilmanyi 

    I would do the following:

    errorstatus.png

     

    1) Initialize a variable with Error Status (succeeded)

    2) If there's an error in the scope -> Set variable to Failed

    3) In the last Terminate action, return value of the variable

     

    Hope it helps!

    Ferran

  • MartonVilmanyi Profile Picture
    34 on at
    Re: how can I clear failed status of a flow inside loop

    my fault, that was indeed missing from the screenshot. I update the post.

    In short: I would like that in the end, the flow reports failed when any unhandled error occurs. 

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

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard