How do I put a number with a leading zero into a text field without losing the zero?
Exactly - use a text field. Obviously this is not a number, and you won't be doing any math wiith it.
The data 04567 is in a number field now. But when imported to the text field, it comes out as 4567.
Import/Export does it with field values, if that is in number field, result is number.
You can use calculation GetAsText(numberfield) to get "entered text" of the field, with leading zeroes.
Or Ctrl+Shift+C (Windows) to copy all records in found set to get formatted field value if the number field is "as entered" in layout mode.
1 of 1 people found this helpful
If you want a 5 character number with leading zeros, the following auto-enter calculation will result in the five characters. Right( "00000" & field ; 5). Uncheck the Do not replace existing values option.
2 of 2 people found this helpful
For this, there is one more useful function
SerialIncrement ( "00000" ; Self )
This function have Integerizability of 2nd parameter, SerialIncrement ( "00000" ; 12.5 ) returns "00012".
I don't know why I keep forgetting this wondrous function! Thanks for reminding me.
The result is still to text.