Administration

How to create a new sequence for an entity?

49 views 27 January, 2017 Valuekeep 0

It is possible to define a sequence in which we incorporate Entity and Sequential Number type segments.

For this type of sequences it is now possible to make the Sequential Number type segments depend on the Entity type segments it is made up by. This allows for the numerator to be incremented according to these segments and not globally.

To create a new sequence for an entity follow these steps:

  1. Access the Sequence list;
  2. Select the “Create” option;
  3. In the Sequence creation operation, select the entity and the field for which you wish to create a new sequence;
  4. Add the segments that make up that sequence to the grid. These can have the following types:
    Entity:
    In the entity column select an entity from those listed on the combo box;
    In the attribute column select one of the available fields;
    In the size column indicate how many characters you wish to incorporate (what you will be selecting are the first N characters of the entity’s X field);
    In Apply to Sequential Number, indicate whether this segment has influence on the incrementation of the Sequential Number type segment (if there is one);
    In the Required column you can even indicate if this is a required field;
    In the Readonly column indicate whether the user may or may not change it;
        Separator:
    Select which character will be used as separator;
        Text;
        Sequential Number:
    Starting value;
    Number of digits.

Example:

If you set the sequence associated to an Item’s key to incorporate segments from the Brand and Model fields and its sequential number to depend on both entities:

  1. When creating an item for brand A, model A, the numerator’s value would be AA0000;
  2. When creating a new item for brand A, model B, the numerator’s value would be AB0000;
  3. If you create a new item for brand A, model A, the numerator’s value would be AA0001;

If you do not set this dependency, values will be globally incremented (AA0000, AB0001 and AA0002).

Note:
The indication of whether an entity type segment has influence on a sequential number’s incrementation is performed on a case by case basis, which means that the existence of more than one segment of this type does not mean that all of them have influence on this value.

When a new sequence is created for an entity which already has records, it is crucial to ensure that the new sequence will not cause conflicts with the existing records. One way to do this is, for example, to indicate a starting number value bigger than the last numerator used in the previous sequence.

Foi útil?