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 / When a "failure" is ac...
Power Automate
Unanswered

When a "failure" is actually a success in the end

(0) ShareShare
ReportReport
Posted on by 638

Greetings!!!

 

I got a flow that gets items from a Sharepoint list.

  1. It looks at the person field 
  2. using that person's email it queries o365 users
  3. End of story

Scenario A

If the user is valid

  1. sharepoint list is updated to reflect - yes this is an active user
  2. end of story

 

Scenario B

If the user is not valid or not found in o365 users, its considered a failure

  1. in a failure we move to another branch set to run only after previous failure
  2. Sharepoint list is updated to reflect - No this is Not active user
  3. End of story

 

My flow runs, it runs well and all updates are properly handled.

The hang up is that if our story ends via Scenario B, its considered a wholesale failure.

Looking at my flow history, = its a failure

 

How can I massage the flow to treat scenario B to also be a success?

Categories:
I have the same question (0)
  • Verified answer
    AlanPs1 Profile Picture
    2,471 on at
    Re: When a "failure" is actually a success in the end

    Hi @chico 

    It would be useful to see a picture of your complete Flow on this one, but if I am understanding correctly, the best way to mark a failure as a success, i.e, the fail is by design is to use a terminate action and mark it as "succeeded". If this suits your Flow design that is.

    Capture-505.png

    This may or may not fit your design though, please post your Flow and we will see.

     

    If you have found my post helpful, please mark thumbs up.

     

    Any other questions, just ask.

     

    Thanks, Alan

     

  • MattWeston365 Profile Picture
    1,701 on at
    Re: When a "failure" is actually a success in the end

    Hi @chico you could always change the "run after" settings so that you can gracefully catch the error. You can do this by clicking on the ellipsis for the step following the failing action and set it to run on Error. This usually works better if you contain all of your logic in scopes. Whilst this will work, the inner developer in me is screaming no 🙂

     

    What I would suggest for a cleaner approach would be to use "Search for Users" and search for the email address. If the length of the body returned is 0, then the user doesn't exist. If it's greater than 0, then you have a match.

     

    Search.PNG

     

    The expression I have used in the condition is:

    length(body('Search_for_users'))
     
    This will at least give you a True/False test which will mean your Flow is a lot cleaner than if you're relying on an error state.
     
    If you have found this post useful, please give it a thumbs up. If it has answered your question, please accept it as the solution so others can benefit.

    @MattWeston365
     
  • chico Profile Picture
    638 on at
    Re: When a "failure" is actually a success in the end

    @AlanPs1 

    awesome input, thank you!

    will be exploring this today!

  • chico Profile Picture
    638 on at
    Re: When a "failure" is actually a success in the end

    @MattWeston365 

     

    awesome input, thank you!

    will be exploring this today!

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