Make it a field of type text and the leading zeroes will be retained. Keep in mind that text will be treated differently than numbers when you sort or when you compare values. In some cases, you may want to have two fields, one of type text and a calculation field of type number that simply returns the numerical value of your text field.
But now the next thing comes up. The Field automatically sets the field with a new record 'field + 1'. After the calculation all zeros are gone.
Now I know there's a custom function in Filemaker for the numbering. Sometimes the field has to be reset to 000000 so I want to perform a script to do that.
check the SerialIncrement( ) function.
In addition to serialincrement, you have a couple of other options you can consider:
For some uses of this type of issue, you can also use a text field with an auto entered serial number option and include the leading zeroes in the next serial value box.
While you can usually just have a text field and use SerialIncrement or the auto-entered serial number option, sometimes it's still usefull to have such a number in a number field. If you find that useful, might as well increment the number field directly and use a calculation to produce the leading zero format for display purposes.
Right ( "000000" & NumberField ; 6 )
Thank you very much!