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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Can I use an environme...
Power Apps
Answered

Can I use an environment variable in Launch function?

(1) ShareShare
ReportReport
Posted on by 522
I wonder if someone can help me answer this question - is it possible to use an environment variable in the launch function?
 
I've tried it as is but it's not working but that may be because I've missed something somewhere!
 
It works if I use the link to the document (which is just stored on SharePoint) but if I change to the environment variable it doesn't.
 
Launch("https://***.sharepoint.com/........",{},FormMode.New)
 
Launch("User Guide Link",{},FormMode.New)
 
If it's not possible I can work with it, it just would be easier to use a variable as the locations for the Test document and the live document will be different (SharePoint vs Website).
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,488 Super User 2025 Season 2 on at
    Hi
     
    Yes you can use environment variables in Launch.
     
    I would add a Trace statement before your Launch statement
    Trace(MyEnvironmentVariable);
     
    Then run Monitor to capture the Trace statement to see what the Value is. Its possible its blank due to not publishing it yet, etc. loads of reasons, but we needt o actually see what the app thinks the value is.
     
    Yes, it should work no problem.
     
  • Suggested answer
    Inogic Profile Picture
    1,135 Super User 2025 Season 2 on at
    Hi,
     
    I have created a custom page where I have used the Environment variable in the Launch function which will open a new URL. If you want to use the Environment variable in the Launch function then use the below formula:-
    Launch(LookUp('Environment Variable Values','Environment Variable Definition'.'Display Name'="Environment Variable Name").Value)
     
    Please mark this answer as accepted solution if it helped you.
     
    Hope this helps.
     
    Thanks!
    Inogic Professional Services: Power Platform/Dynamics 365 CRM
    An expert technical extension for your techno-functional business needs
    Drop an email at crm@inogic.com
    Service: https://www.inogic.com/services/
    Tips and Tricks: https://www.inogic.com/blog/

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard