infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
tcl using $HCISITEDIR and other variables
Keith McLeod
I have been reworking some tcl code. Is it best to use variables in your code such as $HCISITEDIR. I have have several platforms represented, each with much of its code with actual paths in the tcl procs. Can I simply replace the "/hci/root3.8.1P/prod" with $HCISITEDIR whereever it is used in the tclprocs? I am upgrading several systems and would like to make it a little more pain free by using portable code to accommodate for things like the new paths C:quovadxqdx5.3.... I beleive this would also help when changing site names. Any comments or suggestions are most helpful.
Find more posts tagged with
Clovertech
Comments
System
Originally posted by Bill Bertera
in tcl they're: HciSiteDir, HciSite, HciRoot. they're global variables, so you need to have:
global HciSiteDir
global HciSite
global HciRoot
before you use them. It's better to use the variables then hardcode, for the reasons you mention.
Rob Abbott
FWIW, you can also access any environment variable with the env() array:
global env
echo $env(HCISITEDIR)
System
Originally posted by Anonymous
Also, you can find out what all the Cloverleaf provided global variables are using the 'info globals' command.
To find out what the engine globals are, add the following line to a tps proc and look for the output in the log.
echo INFO_GLOBALS<[info globals]>
Note that you'll get a slightly different list if you do the same thing in 'hcitcl'.