Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
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?

Categories:
  • Cooper01 Profile Picture
    664 on at
    Re: Possible to reference an environment variable in Calculated column?

    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.

  • Verified answer
    v-xiaochen-msft Profile Picture
    on at
    Re: Possible to reference an environment variable in Calculated column?

    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

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Microsoft Dataverse

#1
mmbr1606 Profile Picture

mmbr1606 22 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 17

#3
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

Overall leaderboard

Featured topics