Help

Re: Make a primary field of the formula [YEAR]00autonumber

1095 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Sacramento_Tena
4 - Data Explorer
4 - Data Explorer

Hi there,

I am trying to set up a system to make a primary field that references unique case numbers. We do the cases by year, so for example, the first case of this year will be 2022001, the next one will be 2022002, etc. But, we want to use the same table from year to year, so ideally I will have a forumla that pulls the year the record was created, and then adds a 4-digit autonumber. Then in 2023 we will automatically start with 2023001, etc. Any help/advice is greatly appreciated!

12 Replies 12

Yes, that was precisely the method that I was thinking of in my head. Thanks, @kuovonne, for taking the time to do the hard work of typing it all up for me!! :cowboy_hat_face:

But overall, I still prefer a script because

  • you don’t have the extra table and fields filling up your base that you never really need to ever see

  • all the logic is stored in one place (the script) versus scattered across various tables and fields in addition to the automation itself. When you inherit a base and need to perform maintenance, don’t underestimate the benefit of having all the logic in one place. And with a well written/documented script, you can figure out the script’s purpose, tables, and fields without knowing how to code.

  • I happen to like scripts in general😎

One main advantages I see to a non-scripting option is that you can change your field names without breaking the system.

That and the system will work in bases that are in sub-Pro-plan workspaces.