Skip to main content
Solved

Automatic Sequential Numbering of Non-Sequential Items (READ JUN 9 2021 FOLLOW-UP)

  • March 29, 2019
  • 65 replies
  • 626 views

Show first post

65 replies

  • New Participant
  • February 15, 2022

@Timo_Germer Not without using a script. Scripts have no limit on how many records they can retrieve (aside from memory limits, of course, but that’s not an issue I’ve heard of anyone encountering).


Ah I see. Is it easy to set up such a script that runs within an automation? I have tried your provided script. It worked perfectly - but it would have to be triggered manually each time.


Justin_Barrett
Forum|alt.badge.img+21
  • Author
  • Inspiring
  • February 15, 2022

Ah I see. Is it easy to set up such a script that runs within an automation? I have tried your provided script. It worked perfectly - but it would have to be triggered manually each time.


As I wrote in the post just above yours from earlier today:


ScottWorld
Forum|alt.badge.img+35
  • Genius
  • February 15, 2022

For a non-scripting way of doing this (i.e. low-code), I would highly recommend using Integromat. I use Integromat every single day for doing all sorts of advanced automations in Airtable, with no JavaScript necessary. There is a little bit of a learning curve with Integromat, but once you get over the learning curve, it’s extremely powerful:


Forum|alt.badge.img+9
  • Participating Frequently
  • June 16, 2022

Just a note of thanks @Justin_Barrett this suits my needs perfectly - for a WBS after I manually change or assign L1,2,3 - 7 level to an item with it’s own id. An automation not suited to my needs so many thanks - to note for newer users, I didn’t use Airtable in before 2021, now a self referencing table (can be filtered and a dropdown limited to reference only ‘that’ view - for example ‘the parent task’ - so perhaps this is simpler now with Airtable advances - thus look up the ‘id’ of the parent easily forms a WBS character base. I use levels to drag up and down and grab the sequence to assign the WBS


  • New Participant
  • September 9, 2022

Hello, it’s great but how can I see the actually formula ? Thanks


Justin_Barrett
Forum|alt.badge.img+21
  • Author
  • Inspiring
  • September 10, 2022

Hello, it’s great but how can I see the actually formula ? Thanks


Which actual formula are you referring to? There are multiple formulas listed above.


grapefruit09
Forum|alt.badge.img+2
  • New Participant
  • August 16, 2023

For a non-scripting way of doing this (i.e. low-code), I would highly recommend using Integromat. I use Integromat every single day for doing all sorts of advanced automations in Airtable, with no JavaScript necessary. There is a little bit of a learning curve with Integromat, but once you get over the learning curve, it’s extremely powerful:


You didnt actually explain any approach to solving it using integromat so this is quite useless..


Forum|alt.badge.img+3
  • Participating Frequently
  • November 29, 2023

@Justin_Barrett Is there any chance you would you be able to look at my topic and help me? This topic is exactly what I'm needing, but I was given a formula to use to get a certain setup, and it isn't working: https://community.airtable.com/t5/base-design/line-item-support-help/td-p/166098 and the person who helped me is no longer around, it seems. Any guidance would be incredible!


Justin_Barrett
Forum|alt.badge.img+21
  • Author
  • Inspiring
  • November 29, 2023

@Justin_Barrett Is there any chance you would you be able to look at my topic and help me? This topic is exactly what I'm needing, but I was given a formula to use to get a certain setup, and it isn't working: https://community.airtable.com/t5/base-design/line-item-support-help/td-p/166098 and the person who helped me is no longer around, it seems. Any guidance would be incredible!


@ebefort_DDP The techniques I outlined in my original post should still work even after all the changes that Airtable has gone through since then, though frankly it's a bit of a clunky hack that I wouldn't recommend for a production environment. These days I would lean towards something code-based in an automation, but unfortunately I'm no longer able to provide direct help with individual issues, so I can't be of any help putting that code together. I'm sorry.


Forum|alt.badge.img+3
  • Participating Frequently
  • November 29, 2023

@ebefort_DDP The techniques I outlined in my original post should still work even after all the changes that Airtable has gone through since then, though frankly it's a bit of a clunky hack that I wouldn't recommend for a production environment. These days I would lean towards something code-based in an automation, but unfortunately I'm no longer able to provide direct help with individual issues, so I can't be of any help putting that code together. I'm sorry.


Ah! I just realized the date on this! And that is perfectly fine, I so appreciate the response!! Thank you!!


Forum|alt.badge.img+6
  • New Participant
  • July 18, 2024

@Justin_Barrett Genius, thank you! I've pretty much duplicated this solution but for some reason, I dont get the same result in truncated field. Would really appreciate any help!

 

 


Justin_Barrett
Forum|alt.badge.img+21

@Justin_Barrett Genius, thank you! I've pretty much duplicated this solution but for some reason, I dont get the same result in truncated field. Would really appreciate any help!

 

 


Sorry for the delayed reply, @Dollie . I've been navigating a cross-country move for the past several weeks, and haven't been checking my notifications for a bit. That and I almost never visit this forum any more for various reasons.

Anyway, the only thing that sticks out is that your autonumber field has some lines deleted. It starts with 4 instead of 1. One of the things I learned in my testing is that deleted lines can mess up the system. I recommend changing that to a regular number type, manually fix the numbers to start with 1, then convert it back to autonumber again and Airtable will recognize the change.

Let me know if that fixes it. If not I might be able to dive deeper, but frankly my schedule these days seldom allows me to do that.


Forum|alt.badge.img+6
  • New Participant
  • August 12, 2024

Sorry for the delayed reply, @Dollie . I've been navigating a cross-country move for the past several weeks, and haven't been checking my notifications for a bit. That and I almost never visit this forum any more for various reasons.

Anyway, the only thing that sticks out is that your autonumber field has some lines deleted. It starts with 4 instead of 1. One of the things I learned in my testing is that deleted lines can mess up the system. I recommend changing that to a regular number type, manually fix the numbers to start with 1, then convert it back to autonumber again and Airtable will recognize the change.

Let me know if that fixes it. If not I might be able to dive deeper, but frankly my schedule these days seldom allows me to do that.


I found the answers in one of your responses to others. Thank you @Justin_Barrett . This solution is brilliant 


rocks
Forum|alt.badge.img+4
  • New Participant
  • Answer
  • December 17, 2024

After experimenting with both the formula-based approach (using SUBSTITUTE + string manipulation) and another method of counting linked records in a separate base table, I’ve found that leveraging Airtable automations can simplify the process. The original SUBSTITUTE-based solution is clever and works great, but it involves linking all records to a “control” record or table, which may not feel intuitive for some users.

What Worked Best for Me:

A Single-Table Setup Using Automations:
By setting a trigger that fires when a record is fully ready (e.g., once {Base Code} is entered and confirmed for expected char length etc), the automation finds all other records with the same base code and updates the new record with a permanent, incremental code. This removes the need for complex formulas, record linking, and multiple tables.

Why I Like This Solution:

  • Simplicity: Avoids complex formulas like ARRAYJOIN and SUBSTITUTE.
  • Maintainability: Adjusting an automation is imo easier than modifying formulas.
  • User Experience: Team members simply fill in a required field, and the numbering is handled automatically.

Downsides:
This solution will consume some monthly automation runs and may introduce a short delay (a few seconds) before the final code appears.


Justin_Barrett
Forum|alt.badge.img+21
  • Author
  • Inspiring
  • December 28, 2024

After experimenting with both the formula-based approach (using SUBSTITUTE + string manipulation) and another method of counting linked records in a separate base table, I’ve found that leveraging Airtable automations can simplify the process. The original SUBSTITUTE-based solution is clever and works great, but it involves linking all records to a “control” record or table, which may not feel intuitive for some users.

What Worked Best for Me:

A Single-Table Setup Using Automations:
By setting a trigger that fires when a record is fully ready (e.g., once {Base Code} is entered and confirmed for expected char length etc), the automation finds all other records with the same base code and updates the new record with a permanent, incremental code. This removes the need for complex formulas, record linking, and multiple tables.

Why I Like This Solution:

  • Simplicity: Avoids complex formulas like ARRAYJOIN and SUBSTITUTE.
  • Maintainability: Adjusting an automation is imo easier than modifying formulas.
  • User Experience: Team members simply fill in a required field, and the numbering is handled automatically.

Downsides:
This solution will consume some monthly automation runs and may introduce a short delay (a few seconds) before the final code appears.


Definitely a superior solution. At this stage there's no reason to use that old hack that I came up with. It was an interesting experiment at the time and helped folks to get things done, but I definitely don't recommend it any more.