Jan 08 2022
06:52 AM
- last edited on
Feb 01 2023
12:35 PM
by
TechCommunityAP
Jan 08 2022
06:52 AM
- last edited on
Feb 01 2023
12:35 PM
by
TechCommunityAP
Hello,
I am making a Canvas Application in Power Apps in which there arose a situation where I have to make use of environment variables.
As far as I know, after referring multiple blogs and videos, environment variables when created, are stored in the Solutions Sections of the Power Apps, which makes use of the Data Verse, which I don't require.
Is there any way/approach through which I can make a custom defined environment variable, in Power Apps, without storing it in the Solutions Section? Or are there any workarounds of the same?
Thank you.
Jan 27 2022 11:43 AM
Here is a workaround using SharePoint
1. Create a SharePoint list (name it as AppSettings) with a column for each variable you want to configure. For example, "Server", "Version", "Url", etc.
2. Add a single record with the values for each variable
3. From Power Apps, add a SharePoint data source to the list
4. In App->OnStart(),
Set(varAppSettings, First(AppSettings)); //Load the values to a variable
5. Now you can access different environment specific values from the app like varAppSettings.Server, varAppSettings.Version, varAppSettings.Url
Jan 27 2022 01:24 PM