Help

Re: Auto-number with prefix

1521 0
cancel
Showing results for 
Search instead for 
Did you mean: 
dakotat
4 - Data Explorer
4 - Data Explorer

Hi there, 

I have been searching heavily for some help on what I'm trying to achieve but haven't had any luck. What I am looking to do on Airtable is have an autogenerated number for each line item I add but it needs to have a prefix of 6700. It also needs to start at a specific number, lets say 67006789. 

Is there anyway to do this?

dakotat_0-1691614145479.png

 

1 Reply 1
Joe_Svingala
6 - Interface Innovator
6 - Interface Innovator

@dakotat This should be a simple formula solution. For me, I had to Import 55,000 records that had IDs starting at 100000 and incremented up by one, unfortunately this wouldn't have worked with the autonumber field as it starts at 1 & I did not want to delete 99,999 records just to get to the autonumber working the way I wanted.

My solution was as follows:

  1. Create an AutoNumber Field, & name it something that you will remember, ex. Admin_Autonumber
  2. Create a formula field, if this is your primary ID, make sure to migrate whatever ID you have now into another field & then you can change your primary ID field to a formula
  3. To start, since you ALWAYS want the ID to start with '6700' your formula will need to start with that, then depending on what the subsequent numbers are for your FIRST record's ID, you will need to add the mathematical portion to the formula that will take the autonumber & addend to join the two. Example in code block below:

 

"6700"&({Admin_Autonumber}+6788)

 

Assuming that your example ID in your post above would be the first case of the 6700 prefix & autonumeric ID, The result of the above formula would be: 67006789


**Just change the addend in the example (6788) to 1 digit prior to the specific number it needs to start at & you should be good to go