Passing multiple values in and from Tcl fragments

Because xlateInVals and xlateOutVals are lists, you can pass multiple values in and from Tcl fragments.

  1. In the Action pane, specify:
    BULKCOPY
    COPY: (Hello, World!) (0(0).PID(0).#11(0).[0]) -> @someVar (0(0).PID(0).#11(0)[0])
    COPY: @someVar {~0(0).PID(0).#11(0).[0]) -> ?
    COPY: {0(0).PID(0).#19(0).(0) -> 0(0).PID(0).#19(0).(0)}
  2. With the first COPY statement highlighted (Hello, World! . . .), add to the Pre Proc pane:
    set tmp1 [index $xlateInVals 0]
    set tmp2 [string toupper [index $xlateInVals 1]]
    set xlateOutVals [list $tmp1 $tmp2]
  3. With the second COPY statement highlighted (@someVar . . .), add to the Pre Proc pane:
    puts "someVar: [lindex $xlateInVals 0]
    puts "PID.11: [lindex $xlateInVals 1]"
  4. The final result is:
    someVar: Hello, World!
    PID.11: 1111 CHAPEL HILL RD.