Basically you are looking at a "version" table that would store the ItemID and its current version the process would have to both update the ItemID and the Version table so I would think the best way to handle this is via a script and a seperate ItemID creation field
This could even be a global field with a script trigger or a button to submit the ItemID You could even have the script check and verify with the user that they indeed do want to create a new version of the item before actually doing so.
Once verified then the script updates the item table and the version table.
I am somewhat of a novice, what would that script look like?
Your version table would have to be linked to your creation field so that it would be able to retrieve the current version.
If you are establishing that the suffix can only be 2 digits then you will need to take that into account
This is just me typing it in logical fashion don't take it as code
SetVariable[$newversion; versiontbl::itemversion +1]
If[newversion > 99
ShowCustomDialog Box [Version Limit Reached; "Item already has 99 Versions"]
If [$newversion < 9]
SetVariable[$suffixID = "0"& $newversion"]
SetVariable[$suffixID = $newversion]
Show CustomDialog Box [Item ID in use; "Do you wish to proceed with creating a new version of this Item]
SetField[Itemtable:ItemID; gblItementry & $newversion]
optionally you could use the variable "$currversion" in a dialog box or write it out to an audit record etc.
thats the reason I set it so that we dont lose track of it.
If you use the optional Custom Dialogs you will need to use an If [Get(LastMessageChoice) = 2 (or whatever) to abort the script or whatever
The Get(LastMessagChoice) tells you which button they pushed.
If you dont check for a cancel the script will just continue on
One more thing if its a new Item you would have to create a new record in the version table you can do this conditionally with a check of the currversion and newversion variables being = or 1
you can create the new record in the version table at the time you check IsEmpty() too
It really depends on how much you want the user to validate the decision to make a new itemid
I also forgot the hyphen in my text string but thats an easy add.
If you want 3 digits its an additional if dealing with the leading zeros for single or two digit numbers (im sure some of the other text manipulation experts have a better way of doing the suffix string by some fill length function)