Help

Formula or script to number records sequentially to appear in 12 or 13 digits for barcode generation

Topic Labels: Formulas Integrations
867 1
cancel
Showing results for 
Search instead for 
Did you mean: 
jooline
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello all!  I'm using airtable for my inventory management system.  I'm using a bar code extension, and it needs a field to generate barcodes from that will be either 12 or 13 digits.  I already have a field that has just started from one and numbered each record / item sequentially.  So I'd like to change it to just add enough leading zeros that it will work with the barcode generator.  I don't even know where to start, and everything I tried to google was way more complex than my current understanding of code / scripting.  Would be easier for me to understand if there were a solution with airtable formulas but whatever works.  Thanks!

1 Reply 1
Sho
11 - Venus
11 - Venus

Hello @jooline,

This is how the formula is used to fill in the required digits with 0.

 

REPT("0", 12-LEN({Number} & "")) & {Number}

 

 I recommend reading this article as it is also helpful.
Sequential Numbering of Records · Kuovonne's Guide to Airtable (coda.io)