web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Pre-populate environme...
Power Apps
Unanswered

Pre-populate environment variables with comples types

(0) ShareShare
ReportReport
Posted on by 72

I was very happy to see the ability to prepopulate connection references and enviroment variables in the build tools for Azure Devops (as described here https://docs.microsoft.com/en-us/power-platform/alm/conn-ref-env-variables-build-tools). For me this works great with simple string-based values, but can this method also be used to prepopulate environment variables with more complex type such as JSON. I can't seem to get a grip on how to accomplish this.

 

Any with any experiences?

 

{
 "EnvironmentVariables": [
 {
 "SchemaName": "tst_Deployment_env",
 "Value": ""
 }
}

 

I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @larschrjensen :

    The format of the JSON string you provided looks wrong:

     

    {
    "EnvironmentVariables": [
    {
    "SchemaName": "tst_Deployment_env",
    "Value": ""
    } ]
    }

     

    Best Regards,

    Bof

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @larschrjensen 

     

    I encountered the same issue. For me, treating JSONs as strings with escaped double quotes worked.

    Example

    {
     "EnvironmentVariables": [
     {
     "SchemaName": "tst_samplejson",
     "Value": "{\"prop1\":\"val1\",\"prop2\":{\"subprop1\":\"val2\"}}"
     }
     ]
    }

     

    You won't have those backslashes in variable value after solution import.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 612

#3
Valantis Profile Picture

Valantis 604

Last 30 days Overall leaderboard