cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
in2217
Resolver I
Resolver I

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
v-litu-msft
Community Support
Community Support

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.

 

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

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.

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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (93,849)