Skip to main content

Hello, my airtable is used within data within a project management platform I built in sotfr. my client portal users enter data via a softr modal which lands into the airtable and a softr table view that displays the entered data. I need each entries of by user to be auto-numbered from 1 to whatever the final entry is.

For example if the data represented a christmas wishlist, and little bobby entered a “toy truck”, “building blocks”, and “book”, I need the list to show:

  1. toy truck
  2. Building blocks
  3. book

And if little tommy entered “Basketball”, “ipod”, and “ball cap” the list should be 

  1. basketball
  2. ipod
  3. ballcap

The number needs to be hard coded to the entry, so that when the list is sorted differently the number follows along, for example, if I sort little tommy’s list within the softr presentation layer alphabetically the list should be:

3. Ballcap

1. basketball

2. Ipod

 

So how do I assure that the user’s entries are getting numbered automatically and the numbering range is limited by the scope of the user’s entries? If I was unclear, all the entries land into the same table so this data may look like this:

# user gift
1 Bobby Toy Truck
2 Bobby building block
3 Bobby book
1 Tommy basketball
2 Tommy ipod
3 Tommy ball cap

 

Note, this is not my actual application, but the christmas wishlist is a super simplified example for what I actually need. 

Hi there!

This can be accomplished by an automation that runs every time a new record is created.

At first the automation seems simple because:

  1. It can run every time a new record is created
  2. Simply add the next item number for that Client to the newly created item
    • This can be calculated at the client level as a Rollup of the maximum item number +1

But you will have to be cautios if items are created at the same time / very close to each other: the automation might not finish running for the first when a new run starts for the second/third/etc item. This would result in items receiving the same number.

Are the users creating the items one by one or can they submit multiple at the same time?

By analyzing how the process is structured you will be able to create the automation that works correctly for that process.

Best regards,

Matt


Hey ​@RedwolfSports,

I hope I did not skim through your post too fast and missed something.

I love that you are bringing this up as I was waiting for the best opportunity to share this AMAZING tip showcased by ​@COsterman on an Airtable Enterprise Network Event we participated in last month.

Please find the recording here (you’ll want to check min 42:55).

Hope this helps, and special shoutout to Cody :D 

Mike, Consultant @ Automatic Nation


That’s a nice workaround Mike.

I would go forward with that solution if you don’t need a ID-like auto-number. This solution does not require an automation which is great, but the numbers will change if an item is deleted or if they suffer a re-order(for example, if number 4 is deleted, then number 5 changes to number 4 and etc).


Thank you both ​@mtrebinonixon and ​@Mike_AutomaticN  for your ideas. I am just circling back to this today to explore the best approach. However, given my specific scenario I will require the numbering to be “sticky” to the record.

The example I provided was a gross simplification. The actually use case for this is that my customers enter information in each record and then outside the platform we create a unique media file based on that information, and will be naming that file using the numbering scheme from the airtable record. So within the scope of each project :

  1. Customer provided info = Media file 1
  2. Customer provided info = Media file 2

Therefore I cannot risk the airtable list getting renumbered by deletion or other means, hence the resulting numbering scheme needs to be fixed to the record.

I will attempt to apply the ​@mtrebinonixon suggestion now and let you know how it goes. My customers will be entering the data using a modal in the softr interface and I would guess that the they would be unable to add records any faster than 20-30 seconds between each record. I hope that is enough time to allow for each automation run.


Reply