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

Community site session details

Session Id : KO3Xd05sjRBHmwe2JPL68a
Power Apps - Building Power Apps
Unanswered

Data source variables are still referring to old values in different environment

Like (3) ShareShare
ReportReport
Posted on 3 May 2021 09:29:46 by

Hello,

 

As per the recent addition of SP lists to be changed as per the environment variables as explained here - https://powerapps.microsoft.com/en-us/blog/announcing-data-source-environment-variables/

 

The migration process is not working as expected for me at all, I have done as follows:

 

In the existing app, I have added list connector with data source variables by enabling the app settings for the 

Saved working Power apps app, and then removed variable values as explained in the above article

Imported the same solution into different environment with different SP site and list values

 

However, when I run the application, it still adds values in the site and list which was mentioned in the previous environment. I have re-checked the environment variables into new environments which are all as expected with different SP list and site. Unfortunately it's not changing the functionality for the different list for me..

 

Can you please help me what's wrong for me in the migration?

 

Thanks,

I have the same question (0)
  • Data-Crunch Profile Picture
    8 on 21 Jan 2024 at 13:25:31
    Re: Data source variables are still referring to old values in different environment

    @raniasyaana We checked the schema (reference) names in SharePoint and that solved it for us. So, make sure that in both environments the schema names of all columns match exactly. You can find the schema names by going into the list settings, clicking on one of the columns and then observe the URL, for example: 
    https://mysite.sharepoint.com/sites/MySite/_layouts/15/FldEdit.aspx?List=%7B9F299377%7D&Field=Lock%5Fx002f%5FUnlock 

     

    In this case the column has the label "Lock/Unlock", but the schema name is "Lock%5Fx002f%5FUnlock"

    Note that the schema name is only created once and cannot be changed afterwards. So it is important to make sure you create the column with the correct name initially.

    Even when the column label is changed later to e.g. "Lock" the schema name stays fixed to "Lock%5Fx002f%5FUnlock".

     

    Hope that helps!

  • raniasyaana Profile Picture
    7 on 18 Jan 2024 at 00:19:52
    Re: Data source variables are still referring to old values in different environment

    hi, I facing the same issues. any solution/workarounds?

  • WillJay Profile Picture
    99 on 05 Jan 2024 at 10:58:59
    Re: Data source variables are still referring to old values in different environment

    Are you using environment variables in your solution for the data sources? I've found that they've started working better since they implemented the setting of the environment variables at the point of importing, before that I would need to set the variables correctly in the DEV environment and then export them.

  • Data-Crunch Profile Picture
    8 on 04 Jan 2024 at 23:11:29
    Re: Data source variables are still referring to old values in different environment

    I also see the same behavior. Variables still point to the old data source after import... i have "sucessfully" recreated that issue in mulitiple solutions... anyone found a sustainable fix?

  • M_Abt Profile Picture
    4 on 28 Nov 2023 at 10:03:16
    Re: Data source variables are still referring to old values in different environment

    As years go by, still got exactly this behaviour.

  • JensWesterlund Profile Picture
    34 on 04 Apr 2022 at 20:35:25
    Re: Data source variables are still referring to old values in different environment

    I also noticed that it seems to be working with the choices fields now.
    Haven't tested very much yet though but I deployed a managed solution from DEV to PROD and the choices fields and lists are showing the correct values from the lists in the PROD environmend variables without errors.
    However if you go in and edit the app and go to "Data" and look at the lists and press "Edit data" they are still directing you to the DEV-lists.

    Changing the authoring version didnt seem to do anything for me though, I was on 3.22022.23 and it was working as described above and changing to .31 did not make it point to the right lists when chosing edit data.
    That is not a problem though since the apps seems to be working now without having to go in and replace the data sources every time you deploy. 

  • capoaus75 Profile Picture
    122 on 03 Apr 2022 at 01:47:32
    Re: Data source variables are still referring to old values in different environment

    Hi @WillJay 
    I have just deployed a managed solution to my test environment and I am glad to say that all the environment variables are correctly pointing to TEST. I do not have to re-add the connections as described in my previous post.

    If I go to the Default solution in TEST and open the canvas app, I can still see that the Dataset names are still showing the DEV name but the data is correctly saved to the TEST SPO lists.

    This started to work when I have updated the authoring version from 3.22022.23 to 3.22022.31
    capoaus75_0-1648949930832.png

    @WillJay  which authoring version are you running?

    I will keep testing other solutions to see if the issue with the IsSearchable switching back to false and Combo boxes using the Choices function  have been resolved as well. I will update here ASAP.

  • WillJay Profile Picture
    99 on 31 Mar 2022 at 14:57:51
    Re: Data source variables are still referring to old values in different environment

    Can confirm this is still absolutely an issue and doesn't seem to have had any consistent improvement over the last year. Using env variables for ALM with SP lists is unworkable as I effectively have to just thrash around in the target environment, creating unmanaged layers, just making as many changes as I can until - arbitrarily- something will make them work. I've kept track and its a different thing each time (creating unmanaged layer on the app, in the varible it self, saving and publishing a billion times)

     

    So we have to comprimise our ALM to overcome this. Now I have a sol I'm deploying to PROD (obviously will less wiggle room to 'thrash around' in) and I've managed to get it so that when I load the PowerApp in the studio (via the Default solution) it is pointing to the correct list. However playing the same app it continues to point to the old list.

     

    The best bit is that these env var's are brand new to this environment, have never existed in this dataverse pointing to any other list.... so the underlying cause of this issue transports with the solution.

     

    Really poor work undermining the Power Platform ALM forcing us to look towards other solutions for our low-code business apps.

  • Kapako Profile Picture
    14 on 21 Feb 2022 at 16:52:48
    Re: Data source variables are still referring to old values in different environment

    I am still working as before. Load data to collections and refer all components tot the collections.

    When changing environment I remove the sources and add them back pointing to the other environment.

    This is doable for my 24 connections and new releases every other month and also mainly the reason I have not looked into other options. Just lacking the time for it.

  • ScottT2 Profile Picture
    14 on 17 Feb 2022 at 14:28:55
    Re: Data source variables are still referring to old values in different environment

    Just wondering if MS has supplied any kind of work around or solution for this yet.  We are into 2022 and this has been out for a while now.  I've got a ticket with MS and they seem clueless!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete