web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Environment variables ...
Power Apps
Answered

Environment variables problem

(0) ShareShare
ReportReport
Posted on by 95

Hi,

 

I deployed my first managed solution in production correctly by removing the environment variables in the test environment before exporting.

 

My environment variables are data sources for sharepoint sites and lists.

 

It worked fine.

 

Then the second time, I imported an upgraded solution to production and forgot to remove the environment variables in test. 

 

The production instance was now writing data back to the test sharepoint lists.

 

To fix, I re-exported the solution as managed and followed the correct procedure by removing the environment variables in test, exported then re-imported to production. 

 

On the very first time I imported the managed solution to production, the UI gave me the option to select which sharepoint site and lists I needed but on subsequent imports it does not.

 

When I ran my app, it seems that the one environment variable is not pointing to the production instance of the sharepoint list I'm using as it fails.

 

Then, I tried to set the environment variables to the production sources before exporting in test to reset the production instance but it didn't work.

 

I would really appreciate any guidance on how to remap the correct production value in the environment variable in my solution such that when I import it in production it updates correctly?

 

Thank you!

 

Regards,

 

Daniel

I have the same question (0)
  • joe_hannes_col Profile Picture
    1,843 Super User 2024 Season 1 on at

    Hello @danru,

     

    Yes, environment variables can be a bit tricky.

    However, if you know how it's fairly simple to change them in any environment. To do this,

    1. Go to https://make.powerapps.com/
    2. In the menu on the left, open "Solutions"
    3. Open the "Default Solution", which is usually the last item in the list of solutions
    4. In the list of object categories, select "Environment variables":
      joe_hannes_col_0-1676446771052.png

       

    5. Search for and click on the environment variable(s) you want to change

    You may have to open your app in edit mode and republish it for the changes to take effect.

  • danru Profile Picture
    95 on at

    Hey @joe_hannes_col ,

     

    Thank you so much for helping me. I did try this and it didn't update 😞

     

    I definitely created the environment variables in the power apps studio but now when I want to inspect them to see the details in the data tab I can't see anything information about the environment variable that the datasource is connected to.

     

    is there a way to inspect this in the power apps studio?

     

    Thanks again.

     

    Daniel

  • Verified answer
    joe_hannes_col Profile Picture
    1,843 Super User 2024 Season 1 on at

    Hello @danru,

     

    Did you try the approach above (setting the environment variable's value through the Default Solution) in your production or your development environment?

    Could you please try this:

    1. In your development environment, remove the current (and any default) value from the environment variable from your solution. To do this, open the environment variable in the solution screen on https://make.powerapps.com:
      joe_hannes_col_0-1676451641669.png
    2. In your production environment, set the environment variable to your production SharePoint Online site/list in the Default Environment using the approach I shared in the previous post
    3. Export the solution as managed in the dev environment and import it into prod, updating the previous solution

     

  • danru Profile Picture
    95 on at

    Thank you @joe_hannes_col 🙏🙏🙏You helped me tremendously!

  • joe_hannes_col Profile Picture
    1,843 Super User 2024 Season 1 on at

    Hello @danru, glad I could help.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard