Environment variables are used to store configuration settings, such as API endpoints, connection strings, or any other values required by multiple components within a Power Apps environment. When you define these variables at the environment level. Your apps and flows will be easier to update and maintain
Environment variables can be created and modified within a Solution.
To create a new Environment variable follow the below steps:
Sign in to make.powerapps.com and select the Environment where you want to create the Environment variable(s).
Open an existing solution or create a new one
On the command bar, select + New – More – Environment variable
On the New environment variable fill in the fields like the image below depicts.
- Display name : Type the environment variable name
- Name: This is the unique environment variable name, which is automatically generated from the Display name.
- Description: Type a description of the environment variable name
- Data Type: Select between several data types (Decimal number, JSON, Text, Yes/No, Data source, Secret). For the article purposes, I have selected the Data source and Connector “SharePoint”.
- Connection: Select a valid connection that has access to the SharePoint site.
- Parameter Type: Select between (Site, and List). For this article, I have chosen “Site”
- Current site: Select an existing SharePoint site address, i.e. SPDemosite
After finishing the above steps into the Solution object, you will able to see the newly created Environment variable.