Re: Thanks all!

#56742
Rob Galino
Participant

Used the following in a Pre Tcl:

set xlateOutVals [format “%06s” $xlateInVals]

Works like a charm, zero fills when MRN is 6 or less, does nothing if 6 or more…  Used “s” (string) instead of “d” as the “d” would output funky numbers if the MRN was already leading with zeros, see below…

hcitcl>set x 0012

hcitcl>set y [format “%06d” $x]      

hcitcl>echo $y

000010

hcitcl>set x 0012

hcitcl>set y [format “%06s” $x]

hcitcl>echo $y

000012

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,435
Topic Tags
286
Empty Topic Tags
10