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 / Can I use an environme...
Power Apps
Answered

Can I use an environment variable in Launch function?

(1) ShareShare
ReportReport
Posted on by 553
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:
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,975 Super User 2026 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,297 Moderator 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard