cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

PAD output variables doesn't output on error!

Hi,

Why on earth doesn't output variables work when desktop flow errors?
I have an error block set for a "MainErrorTask", and in the block I am, closing open windows and files, setting output variables with i.e. loop no, row no. etc.
In my Power Automate flow, where the desktop flow was triggered, I then have a "if action failed" run desktop flow again, and I have input variables with the values from the output variables, this way my desktop flow can start again, and automatically navigate to the correct loop, row etc. - I am doing this, since sometimes all that went wrong was a webpage that did't load properly or something like that, and running the desktop flow again will not result in an error. I of course have a maximum of re-runs set in my flow, and emails notifying me etc, but as the output variables doesn't populate in cases of errors, then this won't work!

As a workaround I choose "Continue flow run" instead of "Throw error", and then in my subflow MainErrorTask I am ending it with a "Stop flow" action, but this is really not neat, as it will show my flow history as all went fine with the flow, which it didn't!

This is definitely a feature request!

Thanks
Ghita

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

My issue got solved with one of the latest updates to PAD. Using the “Get last error” and stopping the flow with a message. I am a happy camper now.

thanks for trying to help out though.

View solution in original post

5 REPLIES 5
joshd111
Resolver I
Resolver I

@Anonymous It's hard to figure out from your description. Please clarify what input and output variables you mean in the sentence "input variables with the values from the output variables"

Rohith_Raju
Microsoft
Microsoft

Hello @Anonymous ,

Based on your Description, if my understanding is correct, you are trying to use Error Handling in case the Flow fails in PAD.

 You can use  "Continue Flow Run" and On Error "Go to Label" where you can set the Label, pointing to an action where you want the Flow to start from again

image.png

Else as an alternative, you can also use the repeat action, in which case, the action repeats itself until the Application or Browser loads with correct data.

image.png


For the Query related to variables, you may find helpful content in the below Docs:

https://docs.microsoft.com/en-us/power-automate/desktop-flows/manage-variables
https://docs.microsoft.com/en-us/power-automate/desktop-flows/variable-manipulation



Anonymous
Not applicable

My whole issue is, that I want the PAD flow to Throw and error! Even though it is throwing the error, I still want my output variables to output values! This is the issue. If I set the Error block to:
1. Set variable (my output variable)
2. Throw Error

 

The output variable is EMPTY.

If I set my Error Block to:

1. Set variable (my output variable)

2. Continue Flow Run - Run subflow
3. In the Subflow I will end flow

 

The output variable is set correctly, but my Flow will think (correctly), that the PAD flow ended successully!

I want:

1. PAD flow to end with throwing and error

2. Get the value of the output variable

I hope I have made myself more clear now. :0)

Rohith_Raju
Microsoft
Microsoft

Hello @Anonymous ,

Thanks for the details.

If I am right, Data to the Output variable is written only after successful completion of the action. 

When an action fails, immediately an error is Thrown, even before the Output variable can be updated, hence leaving the Output variable empty or Null value.

If you try to skip the action, using Error Handling, then the Action as well as the Output variable pertaining to that Action is jumped without any value to the Output Variable.

Either way, it is mandatory for the Action to be completed in order to Populate a value to the output variable.
Else the Output variable will not be able to Output values. 


Anonymous
Not applicable

My issue got solved with one of the latest updates to PAD. Using the “Get last error” and stopping the flow with a message. I am a happy camper now.

thanks for trying to help out though.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (1,386)