I don’t claim to be a tcl programmer, but I am trying to pull a certain phrase out of result and set it to a variable. I have the following proc in my Pre tcl of a concat in my Xlate:
set text [string toupper $xlateInVals]
set index [string first “IMPRESSION:” $text]
echo “indexIM =$index”
if {$index > -1} {
set text [string range $text $index [string length $text]]
echo “textIM =$text”
set xlateOutVals $text
}
if {$index == -1} {
set OutVal “UNKNOWN”
}
When I run this through my tester the echo textIM shows:
But when I set my variable in my outbound field, it comes out like
Creator
Topic
-
-
Gina,
A hint: all of the values you upvar for an XPLT type proc are LISTS and need to be treated as such.
Also it appears this is a repeating field. If so, you may be able to simplify your Tcl work by Iterating through the repetitions of the field rather than trying to treat the entire set as one field.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.
-
Try using:
set xlateOutVals [list $text]
Also it appers you are setting OutVals and not xlateOutVals in your second set statement.
Robert Milfajt
Northwestern Medicine
Chicago, IL
-
Thanks! That was it! It always seems to be the little things. . .
- The forum ‘Cloverleaf’ is closed to new topics and replies.