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

Notifications

Announcements

Community site session details

Community site session details

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

Environment Variables not Updating when Promoting Solution

(0) ShareShare
ReportReport
Posted on by 130

I have a simple solution in a DEV environment containing a canvas app and 7 cloud flows which utilizes SharePoint as a data source. I have 8 environment variables: one for the SharePoint site and seven for lists within the SharePoint site.

 

As directed, I removed the "current values" for the environment variables from the solution. I then published all customizations and exported the solution. When I import it into the UAT environment the import asks me for the new site and asks me to select all the lists. So far so good.

 

However, when I edit the app, all of the lists are pointing to the DEV environment SharePoint site, not the UAT SharePoint site! I can see in the Default solution that the environment variable for the SharePoint site in UAT is pointing to the UAT SharePoint site, not the DEV SharePoint site. And the list environment variables are pointing to the environment variable for the SharePoint site. However in the app when I click on "Edit Data" on any of the lists it goes to the DEV SharePoint site! How can this be?

 

I've done similar export and imports with canvas apps and SharePoint lists and never had this problem. Does anybody have any idea what could be wrong? I exported and imported with both managed and unmanaged seven times and wasted a whole day testing. I'm out of ideas on how to go forward at this point so any suggestions would be very much appreciated!

I have the same question (0)
  • Verified answer
    Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    Hi @kbirstein - this is a known issue by Microsoft when editing a Canvas App inside a Managed Solution. If you play the app in your UAT environment, the environment variable should reference the correct data sources, irrespective of the data source which appear when you open the app in edit mode.

     

    https://learn.microsoft.com/en-us/troubleshoot/power-platform/power-apps/solutions/dataverse-environment-variables 

  • Verified answer
    kbirstein Profile Picture
    130 on at

    It looks like this is a known issue! Here's the details:

    https://learn.microsoft.com/en-us/troubleshoot/power-platform/power-apps/solutions/dataverse-environment-variables

    "Data source references based on environment variables aren't updated during solution import"

    My issue apparently was the following because when I rebooted, used a different browser in private mode, I got the right lists!

    • Data source environment variables are dynamically retrieved for a data source at play/runtime. For performance reasons, once retrieved, environment variable values are cached locally in the browser. Values might take up to an hour to auto-refresh.

    Also:

    1. Don't rely on Power Apps Studio for info in the target environment. The runtime will be using the correct values. If you need to double check, you can use a Monitor trace.

    2. Don't rely on the data source info flyout for information about what the data source is pointing to. The runtime will use correct information. To verify, you can use a Monitor trace

    This wasn't a problem before when I exported and imported solutions with SharePoint lists, so it seems like Microsoft has instituted some heavy duty caching recently. THANKS MICROSOFT! Maybe Microsoft is just making it more and more difficult to use SharePoint as a data source? HMM. . . .

  • kbirstein Profile Picture
    130 on at

    Actually my solution is not in an Managed environment, so the problem exists in environments that are not managed as well1

  • kbirstein Profile Picture
    130 on at

    OK, so the lists in UAT work in PLAY mode but EDIT mode does not reflect the correct lists. How am I supposed to work this way. FIX THIS MICROSOFT NOW! We pay GOOD MONEY for Power Platform and this kind of experience is UNACCEPTABLE!

     

    1. Don't rely on Power Apps Studio for info in the target environment. The runtime will be using the correct values. If you need to double check, you can use a Monitor trace.

    2. Don't rely on the data source info flyout for information about what the data source is pointing to. The runtime will use correct information. To verify, you can use a Monitor trace

  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    @kbirstein - if you need to Edit a version of an app from your sandbox environment as well as from your Dev environment, I would question your ALM process.

  • kbirstein Profile Picture
    130 on at

    And now on further investigation I find that two small lookup lists can't be seen in UAT at all. The lists appear in the Data list but when I create a new screen and a Gallery, and try to put the name of the List in the Data Source value, and click Edit in the Fields option, NO FIELDS ARE SEEN. I give up. I think my only option is to abandon Power Platform for this client and use Service Now instead. Very very disappointing since the client already has Office 365 and was reasonably assuming that they could use the Power Apps and Power Automate rights that come with their E3 licenses. But with these kinds of issues I can't recommend Power Apps and Power Automate. . .They will just have to pay extra for Service Now.

  • kbirstein Profile Picture
    130 on at

    No, I DON'T want to edit in UAT. I was using Unmanaged just to be able to see where the apps were pointing. . .

  • kbirstein Profile Picture
    130 on at

    In any case I should be able to promote as UNMANAGED to another environment, particularly in the situation where environments are being reorganized and you need to move from one DEV environment to another DEV environment, agreed?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 386 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 321

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 311 Super User 2025 Season 2

Last 30 days Overall leaderboard