About Automatic Sequence Numbers

About Automatic Sequence Numbers

Welcome to our Knowledge Base

Documentation | Blog | Demos | Support

< All Topics
Print

About Automatic Sequence Numbers

The Automatic Sequence Numbers (ASN) is a ZIM feature that allows a field from Entity-Sets or Relationships with fields objects to get its value automatically incremented by one every time a record is added to this object. Usually, such sequential fields are used in these objects to supply a primary key, wherever one is missing. In particular, ASN can be very useful when ZIM is operating in Client/Server mode, where a primary key is required for the correct operation of sets.

An ASN is a positive number ranging from 1 up to a 15-digit number. Any Entity-Sets or Relationships with fields can have one of such ASN. To start its normal operation, each ASN must be initialized with a proper value.

This field is defined as “Seq” in the Required attribute and can have any type and length, indexed or not, provided that the field attributes can hold the ASN (for example an Int of 5 can only hold an ASN up to 32767). Normally, an ASN is defined as a VastInt type with the length of 15 and zero decimals.

ASN can have its value reset at any time and can be disabled and enabled every time needed (for instance, when downloading and uploading existing data to a such object, the ASN must be disabled in order not to let new sequence numbers to be assigned to existing records).

Although ASN can be easily defined manually, it is recommended to use DC to perform this operation since existing data can be handled properly.

Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.

Leave a Reply

Your email address will not be published. Required fields are marked *

en_CAEnglish