Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Controlled AutoInc #..
Sun, Feb 18 2024 6:33 PMPermanent Link

Ian Branch

Avatar

Hi Team,
I want to have an autoinc (generated) # that allways starts withthe 4 digits of the year.
So, 202401, 202402, etc.
I also what it to change to 202502, 202502, etc when 2025 clicks over.
And so on.
Appreciate suggestions on how to manage this.

Regards & TIA,
Ian
Mon, Feb 19 2024 4:24 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Ian


Off the top of my head all I can come up with is using a beforepost trigger and an additional table holding the year and "autoinc" value.

If its for DBiWorkflow let me know table details and I'll try to  produce the trigger for you

More thinking is that a two column solution and resetting the start point for the autoinc each year could be made to work but would be clumsy and require locking everyone out of the database each year when the reset is done.

Roy Lambert
Mon, Feb 19 2024 3:31 PMPermanent Link

Ian Branch

Avatar

Hi Roy,
>>Off the top of my head all I can come up with is using a beforepost trigger and an additional table holding the year and "autoinc" value.

Yup, that was what I came up with, or similar, too.

Ian.
Image