I don’t do inline Tcl for Xlates but I have a proc which will echo whatever you identify in the source.
The key is the variable when referenced as data (in the source or destination) needs to be prefixed with a $
Like this $%g1.
So place it in your Source as $%g1 (or whatever your variable is named) and in the Tcl echo [lindex xltInVals 0] (assuming only the $%g1 is in the Source).
If you would like the echo proc I have, email me.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.