I have a quick, dumb little question today about a seemingly simple translate. On a barcode field, Epic passes a meaningful space at the end of the string. The downstream app strips this space, causing the barcode to break. The workaround from the vendor is to put a backslash at the end of the field if the last character is a space.
Of course, Tcl sees the space and treats it as a list delimiter, so I do the following in the pre-proc box to capture the last character.
set xlateOutVals [ string range [ join $xlateInVals ] end end ]
I assign this to
@lastChar, but can't figure out how to test for a space in a xlate if statement. I have tried the following...
@lastChar eq = # yes, there is a space after the =
@lastChar eq =" "
@lastChar eq ={ }
@lastChar eq =[ ]
I finally got it to work by assigning a blank space to a variable named
@space and then using...
@lastChar eq
@spaceIs there a better way to do this?