Help

Re: Conditional Autonumber? Help!?

2936 1
cancel
Showing results for 
Search instead for 
Did you mean: 
H_F
4 - Data Explorer
4 - Data Explorer

Hi, thanks for any help anyone can give, I feel like my head is going to explode.

Essentially what I’m attempting to do is have an autonumber generate based on the project it is linked to. I am tracking forms that come in from different projects within the same table.

I need it to work so that If a record is associated with ‘Project 1’ it will generate the next number associated with ‘Project 1’ and if I then create a record associated with Project 2 it won’t carry on from the number generated from the ‘Project 1’ recorded created.

I feel like im explaining this so badly, so if anyone needs further clarification I’m happy to give it. I’m an intermediate user concerning Airtable but this is just baffling me completely!

9 Replies 9

Hi there, if I understand correctly, you need an automation / script which generates an autonumber for different projects in the same table. First record for project 1 → #1. First record for project 2 → #1. Next record for project 1 → #2 etc.

Correct?

Yes, that is exactly what I need, is it possible?

Of course. Do you have any experience with script writing?

As in writing formulas in Airtable? I would say only just beyond basic. Scriptwriting like coding, no I don’t have any.

Ok. Do you have a Pro account?

H_F
4 - Data Explorer
4 - Data Explorer

I do have a pro account

I’ve managed to get something similar to work by using the “Find records” automation to look for all the related records, for example “Project 1”, and then updating the field with that value

Consider:
Your table already has two records associated with “Project 1”
You create a record associated with “Project 1”
The automation looks for all records associated with “Project 1” and finds 3 records
The automation updates the record that triggered the automation run with the number 3, which you can get via the length value of the find result

You then create a record associated with “Project 2”
The automation searches for records associated with “Project 2”, and finds 1 record, i.e. the one that was just created
The automation updates the record that triggered the automation with the number 1

Let me know if you end up looking into this and have questions

This issue was covered in the following three posts

Hamlin_Krewson2
6 - Interface Innovator
6 - Interface Innovator

A conditional autonumber is very achievable with two related tables and zero automation (no need for Pro). You can do this by rolling up the recordIDs (or a UNIX timestamp) of related records, and then searching for the position of that number within that related record. I have more details in the following post.

Make a Tip of the Day to automatically post in Slack