- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Sep 20, 2023 02:04 PM
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!
![Sho Sho](https://community.airtable.com/legacyfs/online/avatars/3X/9/4/944df447ee3248d602da7f514c009b40d45b1a92.jpeg)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Sep 20, 2023 05:30 PM - edited ‎Sep 20, 2023 05:32 PM
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)
![](/skins/images/DD0CD7D0ACF200EF4456420D87029A3D/responsive_peak/images/icon_anonymous_message.png)