Automatic Environment Variables in Power Apps
Charlie Phipps-Bennett ????
2x Microsoft BizApps MVP | Delivery Director at Synapx | Founder - SPPUG | Power Apps Super User -??MVP-Phipps | ??PowerApps | ??PowerBi | ??PowerAutomate | ??Copilot
You can now turn on 'Automatically create environment variables when adding data sources'...
Why is this important? What are environment variables? Why when developing an app should I consider a solution and all of its assets?
Environment variables enable the basic application lifecycle management (ALM) scenario of moving applications between Power Platform environments. I recommend the very first thing to do when creating an application is to build your solution. A solution will hold all apps, flows, connection references, and environment variables as well as data tables.
A connection reference is a solution component that contains information about a connector. Both canvas app and operations within a Power Automate flow bind to a connection reference. You can import your connection reference into a target environment with no further configuration needed after the import completes. To change a specific connection associated with a canvas app or flow, you edit the connection reference component within the solution.
领英推荐
Applications require the structure of the tables or connections to be exactly the same between the source and the destination environments, with some differences. Environment variables allow you to specify which of these different external references should be updated as the application is moved across environments. Environment variables store the parameter keys and values, which then serve as input to various other application objects. Separating the parameters from the consuming objects allows you to change the values within the same environment or when you migrate solutions to other environments.
At this point it is important to mention there is two types of exports and imports you can achieve in Power Platform. Managed and Unmanaged. A managed solution prevents you from making code changes, therefore, this is used for moving the solution to a test or production environment. An unmanaged solution means you can still make code changes and is used when moving to another development environment.
To summarise, this feature saves you time as a developer because there is now no need to manually create all your environment variables which are critical when importing solutions to other environments.