Referencing Globals within each other
I have a global that defines the instance that Ensemble is running under. I want to use this as part of another Global so I don't have to hard code a path.
For Example
^OSUWMCInstance = "TestClin"
^OSUMCLDAP("LDAPKey") = "/ensemble/^OSUWMCInstance/mgr/LDAPKeyStore/"
Is this possible?
Thanks
Scott
This isn't the answer to your actual question, but it's worth pointing out ##class(%Library.File).ManagerDirectory() - instead of referencing the global, you could use:
Also, ##class(%SYS.System).GetInstanceName() returns the instance name; you shouldn't need to set that in a global, and (furthermore) the instance name isn't necessarily part of the path to the mgr directory (the two can be configured independently).
Other than that I think you'd be stuck with using XECUTE or $Xecute to do what you originally suggested.
Hi, Scott!
It's obvious, but what about this?
^OSUWMCInstance = "TestClin"
^OSUMCLDAP("LDAPKey") = "/ensemble/"_^OSUWMCInstance_"/mgr/LDAPKeyStore/"