Autoincrement is a function that operates with record numbers. It automatically generates a new record number increased by 1.

It can be used for various purposes. One of them, for example, is registering inquiries for their further processing and statistical purposes.

Autoincrement settings are stored in two tables:

  1. The Number (sys_number) table contains the Maximum digits and the Prefix settings for the table.
  2. The Autoincrement (sys_number_autoincrement) table stores the autoincrement setting related to the table.

If the record in the Number (sys_number) table exists and the record in the Autoincrement (sys_number_autoincrement) table does not, then it will be created automatically, and the numbering will start with 1.

In order to create an autoincrement rule, the following criteria must be met: the object, for which you are configuring an autoincrement, must have a field that should be incremented. It must have a String type, and generally, these fields are named as "Number".

If your table does not have this field, please create it: refer to the Creating a Column article for more information.

  1. Navigate to System Definition → Prefixes.
  2. Click New and fill in the fields.
  3. Click Save or Save and Exit to apply changes.

Autoincrement form fields

Field

Mandatory

Description

Maximum digitsYThe max amount of digits after the prefix.
PrefixYAt least three Latin letters that will be the beginning of every record ID in this table.

Example

You just created the rule, and you filled in the fields:

  • Maximum digits – 6
  • Prefix – ABC

So the first record ID will be ABC000001, and the further ones will be ABC000002, ABC000003, and so on.