Welcome to the Airtable Community! If you're new here, check out our Getting Started area to get the most out of your community experience.

Looking at previous records to count up a number

135 3
Showing results for 
Search instead for 
Did you mean: 

Hello everyone, 

I am trying to automate project numbers in Airtable. For this year I have used autocount to get a rising number of project IDs. My problem now is that for every new year, I want to reset this count. 

So for example the last project in 2022 had the ID 22-105 and the first one for this year should be 23-001.

My logic for this function was

If [previous_record_date_year] == [current_record_date_year] {
   [current_record_number] = [previous_record_number] +1
} else {
   [current_record_number] = 1

Is there a way to implement it that way or am I thinking too lazy?

3 Replies 3

I would argue that you're not thinking lazy ENOUGH!  If I were you I'd just make a new `Autonumber` field for this year instead hahahah

But then I would need to create a new Table for every year which sadly messes with my automations.  

Ahh, yeah fair enough.  And I take it you want all of your projects to be in a single table, if not you'd just duplicate the table, use the duplicate as the archive, and clear out the main one

I reckon if I had a Pro account I'd just script it, and if not I'd link all the projects to a single helper record and use a "Count" field with an automation to paste that count value into the project's ID?