
Announcements
I've been working on an application in my dev Power Apps environment, and recently packaged it up as a solution and moved it to the production environment. As part of this move, I used environment variables to point it to a production copy of the SharePoint list. The schema for the list is identical in both environments.
After testing the app in the prod environment, I created a new item within the app, and it shows up in my prod SP list, as expected. The gallery also shows the list of items from the production list, as expected.
When I go into the data sources section of the app designer, I see my data source listed there, and it's using the name of the environment variable. However, if I right click and choose edit data, it takes me to the development copy of my SharePoint list. Also, I added a new column to my prod SP list, but when I refresh the data source and then click edit fields-->add field on my form, the new column is not there. If I create the same column on the dev copy of my SP list, then I'm able to see it when I edit fields on my production app.
So in practice (submitting/editing items, filtering the gallery) my app is using the prod version of the list as it should, but things like above are still somehow referencing the dev copy. Any idea how this happened, or how to fix it?
Before exporting the solution from dev I did remove the values from the environment variables. And when I imported into the prod environment, it prompted me to provide those values, and I entered the prod version of the SP site and list.
I was able to resolve this finally by doing the following:
Opened solution and updated the values for the site and list environment variables to the correct site and list
Delete the data source from Power Apps
Add data source back, choosing the env variables I just updated
Go to the forms, and try to edit fields. You'll see an error about the control not being connected yet
Click the data source drop down on the form, and re-select the data source name
Answer No when asked to replace data cards