Step 3. Manually Create Fields
REP001 - Create Fields
Field Types: Character fields in LANSA are usually Alpha (up to 256 characters) or if longer, String fields. Numeric fields are most commonly defined as Packed. It is recommended that dates and times are defined as DateTime fields.
In this step you will manually create three fields called iiiSalary,iiiStartDate and iiiEmployNotes.
1. The first field you will create is the iiiSalary packed field.
a. Use the
button on the menu and select .The
dialog will appear.b. Enter the following characteristics for the field:
|
c. Select (ü) the option to .
d. Select (ü) the option to close the dialog. (When you are creating many fields in one go, it is convenient to keep the dialog open.)
e. Press the
button to open the field definition in the Editor.2. Now that the field is open, you can edit all its characteristics.
a. In the Definition tab double-click Default value. In the
tab enter a default value of 10000.
b. Click on Edit Mask. Set its value to 2.
c. The
controls how the field is formatted when displayed. The drop-down for the shows samples of the edit masks. You can also press F1 to review the help text.d. Leave all other field characteristics as their defaults.
e. Save the iiiSalary field definition.
f. Close the field definition.
3. Next, you will create a DateTime field which will be used to store the date an employee joined the department.
Select the
option on the menu and select from the menu options.
The
dialog will be displayed.4. Enter the following characteristics for the field:
|
a. Deselect the option to
.b. Uncheck the
option so that the dialog will appear again.c. Press the
button.The field has been created in the Repository but has not been opened in the Editor.
5. Next you will create a string field to store employee notes.
a. The
dialog will appear again.b. Enter the following characteristics for the field:
|
c. Press the
button.You have now manually created fields Salary, Start Date and Notes.