- This topic has 5 replies, 3 voices, and was last updated 15 years, 1 month ago by .
-
Topic
-
We have a tcl proc that uses a global variable. When it is used in the TPS Inbound Data location, it works fine. When it is moved and used as a pre proc on a route, it errors because it doesn’t recognize the variable. What is different about placing it in those 2 locations. Here is the beginning of the TCL up to where it errors: proc merge_A02 { args } {
global A02_save A02_svmsg
keylget args MODE mode ;# Fetch mode
switch -exact — $mode {
start {
# Perform special init functions
# N.B.: there may or may not be a MSGID key in args
set A02_save 0;set A02_svmsg “”
return “”
}
run {
# ‘run’ mode always has a MSGID; fetch and process it
keylget args MSGID mh
set message [msgget $mh]
set evn4 [ getField “$message” EVN 4 0]
if { ![regexp {A02} $message] } {
return “{CONTINUE $mh}”
}
if { [cequal $evn4 “SWAP”] } {
if {$A02_save} {
And here is the error:
can’t read “A02_save”: no such variable
while executing
“if {$A02_save} {
Thanks,
Kenadi Moore
OhioHealth
- The forum ‘Cloverleaf’ is closed to new topics and replies.