I’ve build a very basic translation to try and trouble shoot an issue I’m have where I want to use a variable “@listBasis” as the basis for an iteration. I found a good suggestion in a previous post about how you could pass the list and the pointer value ($%l1) as input to the copy statement and then use those values to pull an individual value out of the list and place into an instance of your output field. I appear to be having two issues. The first is that the iterate does not appear to execute for each item in the variable list, and the second is that the value of “$%l1” in my copy statement is returning the name of the variable, and not the index counter. I’ve attached screen shoots below that show my entire setup. Here are the results from the testing tool when attempting to run the translation. NOTE: The first line of the output below was generated from the echo statement in my copy statement to show what was found in xlateInVals.
myList: one two three four five six — pointer @listBasis
MESSAGE 1
Tcl callout error
set myList [lindex $xlateInVals 0]
set pointer [lindex $xlateInVals 1]
echo “myList: $myList — pointer $pointer”
set xlateOutVals
]:
errorCode: TCL VALUE INDEX
errorInfo:
bad index “@listBasis”: must be integer?[+-]integer? or end?[+-]integer?
while executing
“lindex $myList $pointer”
invoked from within
“list [lindex $myList $pointer]”
invoked from within
“set xlateOutVals
]”
<End of errorInfo>
Any input or suggestions would be greatly appreciate.
Thanks,
David