
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎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.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎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:
- Create an autonumber field {autonumber}
- Create a formula field by where you have to calculate the length of the autonumber
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Jun 02, 2023 06:04 PM
Doesnt work, any more suggestions?
