cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Franklin76
Frequent Visitor

Environment Variable Returning Unexpected Value

I have a flow in a solution being used to return the value of an environment variable, that is used to determine which environment the flow is running in.  I built the flow in my dev environment and it would return the proper value.  Once I moved the solution to my Production environment, the flow would return an unexpected value.  I'm not sure what is going on and hope someone can help.  Below is the Environment Variable, flow and result.

When the flow runs, it is returning what was at one point the current value of the Environment Variable.  but as you can see from the screenshot, there is no current value to the environment variable.  So I would expect my the result of the flow to have the local variable be the default value of the environment variable.  But the condition, which is checking to see if the current value is not empty, is returning true, as if there was a current value.  This results in my flow returning the wrong value to subsequent flows.

Environment Variable.png

Flow1.png

Flow2.png

Flow3.png

Result

FlowResult1.png

FlowResult2.png

FlowResult3.png

FlowResult4.png

FlowResult5.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
fchopo
Super User II
Super User II

Hello @Franklin76 

Please, have a look at this excellent blog post by @Jcook : Using Environment Variables as Parameters for Power Automate Deployments (ALM) – Flow Alt Delete – J...

Before exporting the solution, remove the current value from the environment variable.

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

View solution in original post

2 REPLIES 2
fchopo
Super User II
Super User II

Hello @Franklin76 

Please, have a look at this excellent blog post by @Jcook : Using Environment Variables as Parameters for Power Automate Deployments (ALM) – Flow Alt Delete – J...

Before exporting the solution, remove the current value from the environment variable.

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

View solution in original post

Thank you @fchopo.  That blog had the one piece of information that I wasn't seeing elsewhere.  When I cleared the Environmental Variable in my solution before exporting, I only cleared out the value.  That blog had the piece showing how to remove the value from the solution.  Once I did that, the variable worked as expected.

Helpful resources

Announcements
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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (70,368)