Print Friendly and PDF

VETtrak Autonumber Generator

VETtrak stores a unique internal identifier for each Client, Award, Invoice and Location.  This internal identifier is stored in the VETtrak database and does not appear in the VETtrak user interface.  These identifers are designed to increment every time a new record of that type is created in VETtrak.  This identifer can be amended to a higher number when using the Set next number option in the General Preferences - Autonumber section.


Autonumber Generation Logic

To describe this functionality we will use the autonumber generated in the Award Wizard as an example.

The Autonumber award options settings found under File - Global Preferences - General Preferences - Autonumber affect the way this number is generated:


The award autonumbers are shared across award types of certificates, statements and other. This means that the internal identifer number sequences cannot be seperated per award type by design.


When a new award is created the Auto number generated is the built using the below logic.

  1. Increment the internal award identifer
  2. Pad the internal identifer with leading zeros so the number is the length of the # of digits field
  3. Add the Prefix to the start of the number

VETtrak will also run checks on generated autonumber for records that may already have that same autonumber.  An autonumber may already be in use if a user has manually entered a number that is above the existing internal identifer sequence.  When the autonumber is being generated a check is performed to find if this value is already in use against another record for that record type.  If a duplicate is found the autonumber will increment and repeat this check and increment process until the number is unique.  

Please note: The above unique number check is not applied on invoice autonumbers by design.

VETtrak will also run a check to see if the autonumber has been set to a higher number using the Set next number option in Global Preferences.  If a higher number has been set VETtrak will save the internal identifier for that record to 1 number prior to the set number so that the next record created will match the set number.

For example, if the existing number in a sequence is 80 and you choose to amend the set number to 100 – this will then save the internal identifier to 99. The reason for this is that the next time a record is created, the increment of the internal identifier means that the record will move to the next number (100) and continue to follow your autonumber settings, resulting in an auto-number of 00100.


Back to Top
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.