Question
· Jul 30, 2018

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

Discussion (2)2
Log in or sign up to continue

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:

##class(%Library.File).ManagerDirectory()_"LDAPKeyStore/"

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.