cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
in2217
Level 8

Why do variables get lost from condition bloc?

Lately I see a strange case where variables dissapear from Condition block.

I would set it normally, it would work for some time, and then all of a suddent the flow would fail with the "null" error message (helpful, right?). 

And when I look into the troubled box I see the variable on the left is gone. The box is blank.

 

It may help to note that the variable is the internal one representing Status of the HTTP call run above the condition.

 

Anyone has a clue on how to prevent this from happening?

4 REPLIES 4
Community Support Team
Community Support Team

Re: Why do variables get lost from condition bloc?

Hi @in2217,

 

Do you mean the variable will appear after a run? I have tested on my side, but not found the same issue.

What's your previous operation of the Flow?

Annotation 2019-08-22 112331.png

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

in2217
Level 8

Re: Why do variables get lost from condition bloc?

 

Previous step is HTTP call.

The thing is that most of the time it works fine. Or we would not be able to use it at all, I guess.

But occasionally this happens. 

 

It always happens after previous step gets renamed. There the variables that are essentially the 

outputs('HTTP_call_name')['StatusCode'] will get automatically updated to reflect the new name of the HTTP step, but then eventually will be lost.

 

So I know to always delete the old variable from the condition statement and then put it again. 

And still they dissapear. 

 

In any case, this behavior is inconsistent.

8-22-2019 6-40-35 AM.png

Community Support Team
Community Support Team

Re: Why do variables get lost from condition bloc?

Hi @in2217,

 

I can see that the issue occurs on my side, I find the dynamic content (Status Code) in the condition box will disappear after I rename the Http action. It may be a transient problem, you can temporarily store the Status Code in a variable and then put in the condition box to prevent it happen again.Annotation 2019-08-22 125226.png

Please have a try, I hope it can help you.

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

in2217
Level 8

Re: Why do variables get lost from condition bloc?

Hi @v-litu-msft ,

I would rather not create another variable. Read somewhere that initiation and set of variables seriously affect performance. My flows are long and already have tens of variables. I would really want to save on one more.

If I do need to manually replace the StatusCode variable in the condition box whenever I rename the HTTP action , this is fine. I'll keep an eye on flow runs (obviously) and if this won't be enough I'll reluctantly use variables.

 

I see this as a bug anyway, so if MS Flow team is reading this, please consider this a bug report.

 

Thank you

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,224)