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 : V2aIukzpoYNYx86L1qtaBD
Power Apps - Building Power Apps
Unanswered

sharepoint dtasource environment variables not working after moving solution to other environment

Like (1) ShareShare
ReportReport
Posted on 3 Apr 2023 07:06:20 by 160

I build the app, created environment variables (Sharepoint) in solution, then added to PowerApps.

Later before export I removed variables from solution and imported to new enviroment (managed or unmanaged solutions tried both).

and then I see that my app is not working, then I edit app and click refresh on data source and  I see that app is not recognizing datasource.

I cannot understand why it is happening, what can be a probelem?

opit_0-1680505706318.png

 

 

 

 

 

  • Radino Profile Picture
    4 on 14 Aug 2024 at 10:39:42
    sharepoint dtasource environment variables not working after moving solution to other environment
    Updating Environment Variables in Managed Solution
    Hi.
    Has anybody found a reason why this is happening?
    I have the same issue.
     
    1. Exporting solution (1.0.0.5) from Tenant1 as unmanaged. All EnvVariables are cleared during export.
    2. Importing solution to Tenan2, as unmanaged. It is updating process, as the solution is already in the Tenant2 with version 1.0.0.4
    3. I am updating all EnvVariables during import process to correct values, pointing to correct SharePoint site and lists in Tenant2
    4. Checking the EnvVariables values (in the updated solution as well as in the dataverse tables) - every variable is pointing to correct SPO site and lists
    5. Editing canvas app and checking data connection through EnvVariables - some variables (8 from 10) are still pointing to wrong SPO site in the Tenant1
     
  • opit Profile Picture
    160 on 03 Apr 2023 at 14:25:26
    Re: sharepoint dtasource environment variables not working after moving solution to other environment

    yes, I do exact like that. 

    that's why is strange for me why datasource variables are not working then in new environment

  • m3ngi3 Profile Picture
    725 on 03 Apr 2023 at 14:22:19
    Re: sharepoint dtasource environment variables not working after moving solution to other environment

    Hi @opit ,

    Just doublechecking: when you define the SharePoint Datasource in your Canvas App --> have you made sure to use the Advanced tab of the Connect to a SharePoint site action:

    Django_0-1680531597820.png

     

    This tab is where you explicitly tell Power Apps to use the Current Value of the Environment Variable to determine the Site and Lists to use.

     

    If you would then empty the Default Value as well as the Current Value from your solution --> when importing first time the wizard will ask you about the Site / Lists for your Environment Variables and thus for your app(s) connected to these EVs.

  • opit Profile Picture
    160 on 03 Apr 2023 at 14:15:25
    Re: sharepoint dtasource environment variables not working after moving solution to other environment

    To change environment variable is not a problem, i just go to default solution, find variable and update it.

    for me is a problem that when I import an app it is not working sharepoint data source references / variables in powerapps app. I need to remove them in app and add again then it works only.

  • Ami K Profile Picture
    15,665 Super User 2024 Season 1 on 03 Apr 2023 at 12:59:31
    Re: sharepoint dtasource environment variables not working after moving solution to other environment

    Unfortunately this is an issue I have written about a last year but as far as I am aware there does not seem to be a solution as it happens intermittently without a common pattern:

     

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Cannot-update-Environment-variable-on-Import-in-a-Solution/m-p/1817575

     

    Also take a look at this post from @Django if you have not already:

     

    https://powerusers.microsoft.com/t5/Microsoft-Dataverse/Updating-Environment-Variables-in-Managed-Solution/td-p/754200

     

  • opit Profile Picture
    160 on 03 Apr 2023 at 08:30:02
    Re: sharepoint dtasource environment variables not working after moving solution to other environment

    tried to update according your advise. but still same problem.

    but what is strange if I open app, remove SP datasource variables, then add again it works perfect.

    but this is not a solution as I need to import managed version.

     

  • Ami K Profile Picture
    15,665 Super User 2024 Season 1 on 03 Apr 2023 at 07:41:16
    Re: sharepoint dtasource environment variables not working after moving solution to other environment

    Hi @opit, for a Managed Solution, have you tried updating the environment variable in the Default Solution?

     

    picture2.jpg

     

    picture1.jpg

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete