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 / Datasources in various...
Power Apps
Unanswered

Datasources in various environments

(0) ShareShare
ReportReport
Posted on by 99

Hi All

 

In beginning to have a separate environment for test and production - can I ask what I need to do with the data sources?

 

Say I have a canvas app in 'Production' environment and the same canvas app in 'Test' environment - I have both of the canvas apps linked to a SharePoint List.  

 

Do I basically need to copy the SharePoint List and then repoint the canvas app that is in 'Test' environment to that newly created SharePoint list? (which is a copy of the original).

 

The thing that stinks is if I do this, doesn't all the naming convention get messed up in PowerApps?  Is there something that would automatically fix this if I repoint datasources?  Is there a better way to do this?

 

Just looking for best way to tackle this.

 

Thanks

  • Hamish Sheild Profile Picture
    3,005 Most Valuable Professional on at

    Hi @IncursioML1 

     

    Have you looked at datasource environment variables to help with this?


    The following article describes a scenario which is very similar to yours…

    https://powerapps.microsoft.com/en-us/blog/announcing-data-source-environment-variables/ 

  • IncursioML1 Profile Picture
    99 on at

    Thanks let me look into this.  I think one of the challenges here is that I'm working through as a user and don't have access to some of the admin tools of the power platform.  This does look like it so let me go through and work with the IT team here to see how to set this up.  I'd figure there'd be a way to do this without having to re-work from scratch.

  • Devikumari Krishna Profile Picture
    988 Super User 2024 Season 1 on at

    Hi @IncursioML1 ,

     

    As far as the SharePoint List - you need to take a copy as the test environment data would be different and the prod environment data would be different.

    To associate them in the flow and canvas apps for each environment, we can do it without altering the flow and apps by using environment variables. 

     

    Login to https://make.powerapps.com

    Navigate to Solutions -> Add New->More->Environment variables

     

    Create an environment variable for Site 

    DeviKrishna_0-1644891148700.png

    Now you can create one more environment variable for the List ( under this site)

     

    You will notice default and current site values - Default will be used when you don't define a current value.

    You can use the same variables in all environment - and simply change the current value in each environment.

     

    DeviKrishna_1-1644891254072.png

    In flows - You can simply use this environment variables by calling custom value,

    DeviKrishna_2-1644891577047.png

     

     

    -------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

     

    My Blog: Dynamics 365 Key Topics – https://d365topicsbydk.com/

    My YouTube Channel : https://www.youtube.com/channel/UCxSIryP2ah2VpEFr-Z72t1A

     

    Regards
    Devi

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 350 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 318

#3
Mohsin Ali Profile Picture

Mohsin Ali 220

Last 30 days Overall leaderboard