scoggins

Iterate with leading zeros

Discussion created by scoggins on Feb 14, 2012
Latest reply on Feb 15, 2012 by scoggins
Does anyone out there know how to iterate with leading zeros?

I make a Text field, for example: TEST... and populate the first row with 000000.

The next iteration I want is 000001, then 000002, up 000600.

I can program sequential numbers, but these slice off the leading zeros.

Essentially, I'm trying to make an ordered unique ID field. I then perform a split on 600 cells to return 600 shapefiles, however in the output geodatabase they are ordered 1, 10, 11, 12, 13, ... , 19, 2, 21 and so on, rather than 1, 2, 3, 4, 5, ... , 600.

Outcomes