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!
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?
No, I DON'T want to edit in UAT. I was using Unmanaged just to be able to see where the apps were pointing. . .
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 - 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.
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!
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.
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
Actually my solution is not in an Managed environment, so the problem exists in environments that are not managed as well1
It looks like this is a known issue! Here's the details:
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:
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.
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. . . .
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.