cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dds
Frequent Visitor

Adding environment variable to canvas app

I've created environment variables pointing to a SP site and SP list within that site, when I open a canvas app it's not pulling through the environment variables as an option in the advanced tab of the Sharepoint connector. I've made sure I'm using the same connection. The variables appear fine in a cloud flow created in the same solution. What else could be stopping an env var created in a solution package from appearing in an app in that same solution?

dds_1-1642081225513.png

 

dds_0-1642081204505.png

dds_2-1642081276188.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
melamri
Super User
Super User

Hi, 

 

There is a note on the documentation which states that existing canvas app cannot use environment variables for data sources. It is recommended to delete the data source and recreate it in order to use environment variables.

I'm not sure if this is for your case. Anyway, don't hesitate to have a look, it could help;

 

melamri_0-1642165190537.png

https://docs.microsoft.com/en-us/powerapps/maker/data-platform/EnvironmentVariables#use-data-source-...

 

Hope it helps ..

View solution in original post

2 REPLIES 2
melamri
Super User
Super User

Hi, 

 

There is a note on the documentation which states that existing canvas app cannot use environment variables for data sources. It is recommended to delete the data source and recreate it in order to use environment variables.

I'm not sure if this is for your case. Anyway, don't hesitate to have a look, it could help;

 

melamri_0-1642165190537.png

https://docs.microsoft.com/en-us/powerapps/maker/data-platform/EnvironmentVariables#use-data-source-...

 

Hope it helps ..

dds
Frequent Visitor

It does appear that the only way I can utilise env variables in a canvas app is by using the 'Automatically create environment variables when adding data sources' option within the app.

I've tried with creating a new app both before and after independently creating the env var's in the same solution package and they still don't appear as options in the data source setup pane, unless the App has created them automatically as above.

 

Thanks!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Users online (3,946)