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 / Possible to reference ...
Power Apps
Answered

Possible to reference an environment variable in Calculated column?

(0) ShareShare
ReportReport
Posted on by 664

I have a canvas app and in the OnStart, if there is a parameter passed with a record ID, it will navigate to a screen with a view form, opening that specific record. I'd like to store the URL on the record for a completely separate reason but the app exists in multiple environments, so the app URL changes.

Ideally, I would like to store the app URL as an environment variable and then I could concatenate that with the parameter and record ID to generate the complete link.

Is there any way to get an environment variable value in the context of the Calculated column editor?

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

    Hi @Cooper01 ,

    Could you tell me:

    1. Do you want to use calculated function in entities? Refer to the picture below
    2. Then do you get the value of the environment variable in this function?

    v-xiaochen-msft_0-1606888261708.jpeg

     

     

    If so, I'm afraid it can't be achieved. Because the two entities ('Environment Variable Definitions' and 'Environment Variable Values') are managed, you cannot use this function.

    In other types of entities, although you can use this function, you cannot get the value of the environment variable.

     

    So, I suggest you get environment variables in the app. Then use the concat() function to generate a complete URL from the environment variables and ID.

    It is a good choice to write the formula in the onstart property.

     

    If you still have any question, please don’t hesitate to let me know.

    Best Regards,

    Wearsky

  • Cooper01 Profile Picture
    664 on at

    Thanks for the response. Marking as solution because my question was answered as this cannot be achieved via calculated column. The calculated column was to be used outside the context of the Power App so unfortunately workaround will not work for this.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 491

#2
WarrenBelz Profile Picture

WarrenBelz 407 Most Valuable Professional

#3
11manish Profile Picture

11manish 331

Last 30 days Overall leaderboard