Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Jul 18, 2018 10:17 PM
I’m trying to automate an order ID. So when a new row is added, it is given an automatic ID. The existing ID from pre-AirTable looks like: LS000000
E.g. LS and then six zeros. The first order should look like LS000001, the next order like LS000002 etc
Currently I use:
Field 1 - AutoNumber (AutoID)
Field 2 - Formula = CONCATENATE(“LS00”, (AutoID))
Which gives LS001, LS002 etc. It looks right when we get to LS001000 e.g. all 6 digits now present.
Any ideas how to force the six zeros from the start?
Jul 18, 2018 11:45 PM
You need to count the ID characters and fill with zeros till 6.
'LS' & REPT(0,6-LEN(CONCATENATE({ID}))) & {ID}
Jul 19, 2018 12:18 AM
Awesome! Thanks :grinning_face_with_smiling_eyes:
Jul 19, 2018 03:25 AM
Just an alternative solution, for fun:
“LS” & RIGHT ( “000000” & ID )
Jul 19, 2018 05:57 AM
I don’t understand :thinking:
I think you meant: 'LS' & RIGHT('000000' & ID,6)
A lot cleaner :grinning_face_with_sweat:
Jul 19, 2018 06:21 AM
Oups !
Yes that’s it, six digits from the right. !
Sorry !
Dec 14, 2023 11:37 AM
Nice!
But I'd like to go further: I need automatic numbering as a Taxonomic Numbers: 1.; 1.1; 1.2; 1.2.1; 1.2.2; 1.3; .....
I tryed through this post: How to automatize hierarchical or outline numberin... - Airtable Community, but no answer at all.
Does anybody have a hint for me?