Consecutive auto increments?

Is there any way we can have an auto-increment field that starts over based on what connection is used?

For example,

Record 1, Connection 1, Number = 1
Record 2, Connection 1, Number = 2
Record 3, Connection 1, Number = 3
Record 4, Connection 2, Number = 1
Record 5, Connection 2, Number = 2

Etc…

So each time my users add a record that is connected to their Company the record ID will increment by one for that specific company unlike the auto-increment field which increments no matter the connection.

Hey JashK, welcome to the community!

This is a really good question! After a few attempts at a workaround for this, I managed to accomplish it by using a Complex Formula (Count) Field and Conditional Table Rules.

To explain how to do this, I’ll use an example.

Let’s say we have two tables

  1. Companies
  2. Jobs

(The Job table is connected to the Company table)

The Jobs table will need a number field (I’ve called it “Consecutive Number”)

And the Companies table will need a Count Field that will count the total Jobs there are currently for a company. (I’ve called this field “Total Jobs”)

Now, the only thing that’s left to do is to add two “On Create” Table Rules on the Jobs table

1 Like