Skip to main content

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!

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)


Reply