|
Answer» Environment variables are produced in PowerApps for each environment and store the parameter keys and values. Furthermore, these variables are used as input to a variety of other application objects. This method allows you to separate the parameters from the consuming objects and alter the values within the same environment or when migrating solutions to different ENVIRONMENTS. The FOLLOWING are some of the advantages of using environmental variables: - While importing solutions to various environments, provide new parameter values.
- Save settings for canvas apps and flows' data sources. You can, for example, keep SharePoint Online site and list parameters in environment variables, allowing you to connect to different sites and lists in different environments without having to change the apps or flows.
- Continuous integration and continuous delivery (CI/CD) are enabled by SolutionPackager and DevOps tools.
- The environment variables can be unpacked and saved in source control. You can also save different environment variables values files for the varied CONFIGURATIONS required in various environments. The file matching to the environment where the solution will be imported can then be accepted by Solution Packager.
The steps to create an environment variable in a solution are: - Sign in to Power Apps (make.powerapps.com) and then click Solutions from the left pane.
- Create a new solution or open the one you want.
- Select New > More from the command bar, then the Environment variable.
- Complete the following columns in the right pane, then click Save:
- Display name: Give the environment variable a name.
- Name: The unique name is produced automatically from the Display name, HOWEVER, you can alter it if you want.
- Data type: Decimal number, Text, JSON, Two options, Data source, or Secret are the possibilities available.
- Current VALUE: Also referred to as the value. This property is a part of the environment variable value table and is optional. Even if a default value is provided, if a value is available, it will be used. If you don't want to use the value in the next environment, remove it from your solution. Within the exported solution.zip file, the values are also divided into distinct JSON files that can be changed offline.
- The default value: This column is not necessary and is part of the environment variable definition table. If there is no current value, the default value is used.
|