May 20, 2022 05:50 AM
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!
May 20, 2022 06:48 AM
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.
May 20, 2022 07:20 AM
Yes, that is exactly what I need, is it possible?
May 20, 2022 07:35 AM
Of course. Do you have any experience with script writing?
May 20, 2022 07:37 AM
As in writing formulas in Airtable? I would say only just beyond basic. Scriptwriting like coding, no I don’t have any.
May 20, 2022 07:38 AM
Ok. Do you have a Pro account?
May 20, 2022 07:57 AM
I do have a pro account
May 20, 2022 08:41 AM
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
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
May 20, 2022 09:12 AM
This issue was covered in the following three posts
Jun 03, 2022 07:58 AM
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.