IP – fill up numbers with leading zeros

For InfoPath to display a number value in a field with leading zeros add the formula:

concat(substring(“000″, 1, 3 – string-length(fieldname)), fieldname)

would turn into: 1=001, 11=011, 111=111

concat(substring(“0000″, 1, 4 – string-length(fieldname)), fieldname)

would turn into: 1=0001, 11=0011, 111=0111 , 1111=1111

and so on

Is this Pages usefull? Usefull Useless 2 of 2 people say this Pages is usefull.