Originally posted by Ariba Jones
I am trying to trim the leading zeroes from the MRN number in PID-3.1. I have this proc that I am trying to use, but I am getting an error message in my xlate that the variable is not defined. I don't know what else to do with this. I am not TCL savvy.
Can anyone tell me what I need to do for this? Or if there are any other suggestions, I will be happy to try them. I need to get this working by end of day today, if possible.
proc TrimLeadingZeroes {n} {
if {[string length $n] == 0} {return ""}
set trimmed [string trimleft $n 0]
if {[string length $trimmed] == 0} {
return "0"
} else {
return $trimmed
}
}