This chapter shows you:
How to create a sequential number record.
How to update a sequential number record.
How to delete a sequential number record.
The Sequential Number file is used in conjunction with Format Control to generate sequence numbers for records in a database. The sequence number is automatically incremented or decremented when a new record is added.
For instructions on creating a Format Control record with sequential numbering, refer to the Format Control documentation.
Accessing the Sequential Number File
The sequential number records are accessed from the Tools menu under the Utility tab of the administrator’s home menu.
To access the Sequential Number file:
1 Click the Utilities tab.
2 Click the Tools button.
3 Click Sequential Numbers.
Figure 3-1: Blank Sequential Number Record
Accessing the Sequential Number File W 57 System Tailoring, Volume 3
Sequential Number Fields
Note: The number must be stored as a character type to use either the prefix or suffix.
Important: If you already have records in your database with employee number fields, be sure that your last number used contains a value greater than your existing employee number.
Class A unique identifier for the sequential number record.
Last Number The value from which the sequential numbering starts.
For example, to start the numbering at one, this value is set to zero.
Decrement? A boolean value controlling whether the sequential
number increments or decrements. A value of FALSE or NULL (blank) means increment. A value of TRUE means decrement.
Description A short explanation of the use of this sequential
number.
Reset Point The value at which the sequential number resets to its
original starting value. If left blank, the sequential number never resets.
Increment/Decrement By
The value by which each number will increase or decrease.
Length The total length of the number string for character type
sequential numbers. Numbers are left-padded with zeros to reach this length. The length of the sequential number varies if this value is zero or blank.
Prefix This string precedes the actual number for
character-type sequential numbers. For example, if the desired format of a sequential number is EMP99999 to number employee records, enter EMP in the prefix field.
Suffix This string follows the actual number for
character-type sequential numbers. For example, if the desired format of a sequential number is 99999EMP, enter EMP in the suffix field.
Creating a Sequential Number Record
Sequential numbers can be set up to work in several different ways. The examples that follow show you how to use each setup. The first example shows how to set up a normal number counter.
Setup a simple number counter
The following examples illustrates how to create a record called employee in the Sequential Number File to automatically increment employee numbers starting with 1.
1 Access the Sequential number file.
2 Create a new file. Enter employee in the Class field for this example.
3 Enter 0 in the Last Number field to begin incrementing from zero.
4 Enter a short description for the number class.
For example: Employee ID number counter. 5 Enter 1000 in the Reset Point field.
6 Enter 1 for the Increment/Decrement field value.
Since the Decrement field was left blank, each number will increase by one.
7 Click the Add button.
Creating a Sequential Number Record W 59 System Tailoring, Volume 3
The new sequential number record is added to the sequential number file (Figure 3-2 on page 59).
Using decrement in sequential numbers
You can use sequential numbers to decrement a starting value. For example, you can decrement a quantity field when deleting stock from inventory.
This example shows you how to decrement a value starting at 1000.
1 For this example, enter active.devices in the Class field.
2 Enter 1000 in the Last Number field.
3 Enter a short description for the number class.
For example, enter Number of devices available. 4 Enter true in the Decrement field.
5 Enter 0 in the Reset Point field.
6 Enter 1 for the Increment/Decrement field value.
Figure 3-2: New incrementing sequential number record.
Since the Decrement field was set to true, each number will decrease by one.
7 Click Add.
The new sequential number record is added to the sequential number file.
Using Prefix and Suffix in sequential numbers
This example uses prefixes and suffixes to assign character type ID numbers to workstation devices. The format of the ID is: DEV<number>T
where DEV is a fixed character prefix, <number> is a sequential number starting with 1, and T is a fixed character suffix.
1 For this example, enter devices in the Class field.
2 Enter 0 in the Last Number field.
3 Enter a short description for the number class.
For example, enter Workstation device ID counter. 4 Leave the Decrement field blank.
5 Enter 1000 in the Reset Point field.
6 Enter 1 for the Increment/Decrement field value.
7 Enter 5 in the Length field.
8 Enter DEV in the Prefix field.
9 Enter T in the Suffix field.
10 Click Add.
The new sequential number record is added to the sequential number file. The first sequential number for the devices class will be DEV00001T.
Updating a Sequential Number Record W 61 System Tailoring, Volume 3
Updating a Sequential Number Record
To update an existing sequential number record:
1 Access the sequential number record. Use the search function or select the record from a record list.
2 Enter any changes to the fields you want to update.
3 Click Save.
Deleting a Sequential Number Record
To delete an existing sequential number record:
1 Access the sequential number record that you want to delete. Use the search function or select the record from a record list.
For example, use the employee record created earlier in this chapter.
2 Click Delete.
You are prompted to confirm that you want to delete the record.
3 Click Yes.
The previous form is displayed with the message: Record deleted from the number file.
Scripting W 63