Automatic reference based on year and incremental value

Hi all

I would like to automatically allocate a reference to projects in the following format

financial year & " - " & incremental number starting at 1001 (where the incremental value resets when we start a new financial year)

eg.
2020 - 1001
2020 - 1002
2020 - 1003
2021 - 1001
2021 - 1002

any ideas how I might go about this?

Hi Kevin,

Was just looking back and spotted you never got a reply on this one.

I am sure you’ve long since found a solution but, in case anyone else views this, one approach would be:

  1. Variable, called “Project incremental reference”, integer, default 1000
  2. Signal, fires 1st of January every year
  3. Rule, triggered by above Signal, action ‘Reset variable to default value’
  4. Rule, triggered by creation of Project record, increments variable value *
  5. Composite, type Text, Built from the current time’s year and the variable value (screenshot below)
  6. Rule, triggered by creation of Project record, copies composite value into reference property

Screenshot 2021-02-11 at 23.09.54

*Actually difficult because there’s no global action to increment the variable. (Now added to the wishlist!) Might require Code Studio for this one step.

An alternative approach is to do the whole thing in one Code Studio Event Action.

Paul