Hello – I’m checking a field for numeric value. If the field is numeric (integer or double) then I need to clear another field in the hl7 message.
The inline code is fine up to the point where I try to assign the outcome of the check of the numeric value. The outcome of the check (0 or 1) is not passed to $xlateOutVals. What am I doing wrong? Is there a better way to check the field for a numeric value?
Inline code below with debug and all, and some comments. Testing with numeric field = 111.111
set out $xlateInVals // out is 111.111
#set out [string is integer -strict $xlateInVals]
#echo WHAT IS OUT ****** $out
if {[string is double -strict $out]} { /// return 1 if numeric
echo OUT is numeric $out // prints 1
set out “1” // explicitely setting out
echo NEW OUT is numeric $out // prints 1
set $xlateOutVals $out // keeps what is in $xlateInValues
echo NEW XOUTVALS $xlateOutVals // prints 111.111
} else {
echo OUT is NOT numeric $out
set out “0”
echo NEW OUT is NOT numeric $out
set $xlateOutVals $out
}
#set $xlateOutVals $out
Thank you in advance.