Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Oct 18, 2021 10:28 PM
Hi,
I have been trying to figure out how to increment a number upon adding a new line.
For example,
Line 1 = A0001
Line 2 = A0002
Line 3 = A0003
I understand that the function of auto-number helps but i would like the characters in the front and wanted to see if there was a more efficient way than manually inputting this every line.
Thank you.
Oct 19, 2021 02:12 AM
Hi @Matthew_Chua,
welcome to Airtable community!
To do your process my recommendation is to apply the following steps:
LEN(CONCATENATE(autonumber,""))
The step 2 will convert the number value in to text so you can count the length by the Len() function. You need this because your serial number has 4 numerical digits
3. Create a formula that will generate the serial number based n the length of the autonumber. For better system efficiency I recommend to use SWITCH() formula:
SWITCH(number_length,1,"A000"&autonumber,2,"A00"&autonumber,3,"A0"&autonumber,4,"A"&autonumber)
Please try this and text us back if it worked :slightly_smiling_face:
Thanks.
Dimitris Goudis
Jun 02, 2023 06:04 PM
Doesnt work, any more suggestions?