cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
dpana
Level: Powered On

Environment variables not publishing from staging to prod

I created an environment variable to store a value that is different in my staging environment versus my production environment. In the staging environment, I set the "default value" of the variable to the value that should be used in prod, and the "current value" to the value that should be used in staging.

 

My understanding is that the "current value" needs to be removed from the solution before exporting my solution and importing to production, since otherwise the staging value will be promoted and used in production.

 

I have tried both "remove from this solution" and "delete from this environment," but both options have resulted in the environment variable not being promoted to production at all.

 

What am I doing wrong?

2 REPLIES 2
Community Support Team
Community Support Team

Re: Environment variables not publishing from staging to prod

Hi @dpana ,

Do you set a "Default value" for the Environment Variable for using within Production Environment?

 

Actually, it is not necessary to remove the "current value" for your Environment variable before exporting and importing to another Environment through solution.

 

Currently, the "current value" of Environment variable could not remain the same across different environments. When you import the Environment variable from your staging Env to Prod Env, the "current value" of the Environment variable would be lost.

Only the "Default value" of the Environment variable could remain the same across different environments. Please check the following blog for more details:

https://powerapps.microsoft.com/en-us/blog/environment-variables-available-in-preview/

 

On your side, you just need to set a "Default value" for your Environment variable, then export the solution contains the Enviroment variable from your staging Env, then import it into your Prod Env, after that, you could use the "Default value" of the Environment variable in your Prod Env (through the Environment Variable Definition and Environment Variable Value entities).

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
dpana
Level: Powered On

Re: Environment variables not publishing from staging to prod

Ah, I see. So the options "remove from solution" and "delete from this environment" remove the entire variable (including the default value)? I did have a default option set, but the variable did not promote at all.

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (4,147)