Thanks for this tip, Jim. I had the same requirement and was wondering how to get this to work.
Works like a charm: add an extra field to the VRL, copy something into this field and then use a tcl-proc to always remove the last field.
proc orbis_VRL_remove_last_field { args } {
keylget args MODE mode ;# Fetch mode
keylget args ARGS uargs
set debug 0 ; keylget uargs DEBUG debug
set sep “;” ; keylget uargs SEP sep
set dispList {} ;# Nothing to return
switch -exact — $mode {
start {
# Perform special init functions
# N.B.: there may or may not be a MSGID key in args
}
run {
# ‘run’ mode always has a MSGID; fetch and process it
keylget args MSGID mh
set msg [msgget $mh];
set fieldlist [split $msg $sep]
set lengte [llength $fieldlist]
lvarpop fieldlist $lengte-1
set msgout [join $fieldlist $sep]
msgset $mh $msgout
lappend dispList “CONTINUE $mh”
return $dispList
}
time {
# Timer-based processing
# N.B.: there may or may not be a MSGID key in args
}
shutdown {
# Doing some clean-up work
}
default {
error “Unknown mode ‘$mode’ orbis_VRL_remove_last_field”
}
}
return $dispList
}
Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands