Create a variable to check if on test or live environment
Hi all,
I need some help in studio.
Is there a way to create a variable to determine if it is in the test or live environment?
Thanks
Adrian
Product version: HealthShare 2020.1
Hi all,
I need some help in studio.
Is there a way to create a variable to determine if it is in the test or live environment?
Thanks
Adrian
Please explain what you mean by "create a variable"?
So create a context.variable which would be either set to LIVE or TEST depending on what environment it is on?
Hope that makes sense
See https://community.intersystems.com/post/portal-tip-system-mode
Thanks for the link, thats helped alot!
Are you asking how to check a global to see if the system is Dev/Test/Production as per the "System Mode" dropdown in the "Memory and Startup" page in the SMP?
If so, then this is stored in the following global:
^%SYS("SystemMode")
It should have values like "DEVELOPMENT", "TEST" and "LIVE"
Yes thats perfect thanks
Hello Adrian,
Some people already talked about the system mode for the portal, but John (one of your commenters) previously wrote a different post about adding information to the terminal prompt itself which may be useful as well:
https://community.intersystems.com/post/where-am-i-adding-extra-information-terminal-prompt
There's a documentation link on that page, but you can have your terminal be prefixed by host name or instance name, for example.