Step 3 Assign the System Variable as a Default Value

Visual LANSA

Step 3. Assign the System Variable as a Default Value

REP004 - System and Multilingual Variables

In this step you will assign the system variable you created as the default value of the iiiEmployNumber field. By using this system variable, the value of the field will be incremented by 1 each time the field is used.

1.  Open the iiiEmployNumber field in the Editor.

2.  Change the Default value to use the new system variable you created, *AUTOALP02iiiNUM. You can do this by entering *AUTO and using the prompt button.

     The find dialog will display objects with names like *AUTO.

3.  Select your *AUTOALP02iiiNUM system variable and press OK.

4.  Save and close the field.

5.  This type of system variable stores the "next number" in a data area (in this case a data area named IIINUM, which is defined as the last part of the system variable name).

     The data area is read with a lock, incremented, returns the value to your form and then updates the data area (and releases the lock).

     If the data area does not already exist, it is created when first referenced. It is stored in the partition module library.