Accessed from System Configuration >> System Data >> Sequence Definition
Following initial installation, each sequence used in the system will have a default value, which will also be the sequence starting point.
System administrators should give a lot of consideration to how these are initially configured as it is not recommended that any sequence is changed following the system being used, often referred to as ‘going live’.
If a sequence is to be changed select a value, click on the detail icon which will launch the detail form, from where the change mode can be enabled and the sequence definition edited.
Function of fields:
Code
This is the table and field name within the database that contains the automatically generated sequence e.g. the work order number is stored in the ‘woJob’ table in the ‘JobCode’ field.
Current Value
This field displays the current value of the sequence. If the system has just been initially installed this will represent the starting point of the sequence, if the system has already gone live this will represent the current sequence value.
Format Type
The sequence can either be field format or a string. The option selected here will determine the syntax of the expression that needs to be configured. This is detailed below.
Format
Field Format
The format is made up from string values and optionally 4 parameters.
The string values are free text and can be used for example as alpha numeric prefixes, i.e. ‘WO/’
The format syntax is built up by making a statement from string content and parameters.
For example;
WO/{0}
Would make a work order number sequence from the characters ‘WO/’ and the current work order number i.e.
WO/1058
Parameters
The parameters should be contained in curly brackets {}.
{0:format} This represents the field ‘current value’, its format can be specified.
{1:format} This displays the current date; its format can be specified.
{2} this parameter is for special use by the business object. It provides different data depending on the business object. For example, in the case of a work order it would automatically input the department field into the sequence.
{3:format} This generates control digits.
So an alternative example of a ‘woJob.JobCode’ format would be:
123{0:000000}-{3}/{2}/{1:MMMM}
Prefix with ‘123’, use work order number and fixed to six digits with control digit, insert department field and add the current date formatted as just a four-character month.
This sequence will create a work order of 1230014160/June.
123 001416 0 / blank / June
String Expression
The format field in this type is String Expression (refer to FastNet documentation). This expression is evaluated in the context of calling a business object.
In the example below, which describes a sequence for Purchase Orders, the string expression will be evaluated in the context of a Purchase Order which is created so any unambiguously related data could be used in that expression.
In that case the inStoreLoc.StoreCode is used to include store code in sequence text. Additionally, the expression must always contain the variable #CurrentValue for actual value of sequence counter.
format(“PO/{0}/{1:000000}”,inStoreLoc.StoreCode,#CurrentValue