Does anybody know of more getvar() options than the ones which are listed in the help file?? I know that there is :
getvar("testname"); and getvar("test_name")
which are totally different for example.
I can't really think of any further examples off-hand, but here's how we retrieve configuration values from a text file and assign using 'setvar'.
See Lookup_Table_Pair function in attached file - this retrieves name/value pairs from a text file (sample attached).
We then pass the value returned to 'setvar' and then set as a public constant allowing the config value to be used from all scripts.
var = Lookup_Table_Pair(sPathToTable,"TEST_SYS"); # Get value from config file
setvar ("TEST_SYS", var); # Set env variable
public const TEST_SYS= (getvar ("TEST_SYS")); # Env variables seem to be lost when a script is unloaded, hence set a public constant which will persist while WR is running (even when a script is unloaded).