Specifications

Plan and Create the Production Form 59
ID Works Basic Version 5 Administrator’s Guide
Auto Sequence Field
If your ID Works project is connected to a database, you can use an
auto sequence field to create a unique database value when a record
is inserted in the database. You can specify the length of the field, the
minimum value that will be used for the sequence, a prompt for the
field, and how the field will look on the form—the font and color
attributes of the operator prompt and the value. You can also specify
that the database value be modified when the record is updated.
Auto sequence fields are always Read Only.
A Production Form can have only one auto sequence field.
When a Production operator saves a record from a Production Form
that has an auto sequence field, the ID Works software queries the
database to determine the current maximum value for that database
table column. If the current maximum value is larger than the
minimum value specified in the field properties, the value used for the
record is 1 greater than the current maximum value. If the current
maximum value is smaller than the minimum value specified, the
value used for the record is the minimum value. The same process is
used when a database record is updated if you have specified that
the database table column associated with the auto sequence field be
modified when the record is updated.
Because the auto sequence field requires a database query before
each record is inserted, inserting records will be slower. In addition, if
multiple users attempt to insert records simultaneously to a shared
database, there is a chance that a duplicate value will be used and
will result in a “duplicate key” error for all but the first user. To avoid
this possibility, use the Access AutoNumber data type with a
Production Form text field instead of an auto sequence field.
Conversely, you should use the Production Form auto sequence field
if you want to use the value for naming an image file, either by itself or
as part of a composite field. An Access AutoNumber cannot be used
because the number is not available when the file name is created.
See the online help topic “Add an auto sequence field to a Production
Form” for step-by-step instructions.