Step 3 Manually Create Fields

Visual LANSA

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 New button on the File menu and select Field.

     The New field dialog will appear.

b.  Enter the following characteristics for the field:

Field name

iiiSalary

Description

Salary

Field type

Packed

Field length

11

Decimals

2

 

c.  Select (ü) the option to Open in editor.

d.  Select (ü) the Close option to close the New Field dialog. (When you are creating many fields in one go, it is convenient to keep the dialog open.)

e.  Press the Create 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 Details tab enter a default value of 10000.

b.  Click on Edit Mask. Set its value to 2.

c.  The Edit Mask controls how the field is formatted when displayed. The drop-down for the Edit Mask 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 New option on the File menu and select Field from the menu options.

     The New field dialog will be displayed.

4.  Enter the following characteristics for the field:

Field name

iiiStartDate

Description

Start Date

Field type

DateTime

Field length

26

Enabled for RDMLX

Yes

 

a.  Deselect the option to Open in editor.

b.  Uncheck the Close option so that the New field dialog will appear again.

c.  Press the Create 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 New field dialog will appear again.

b.  Enter the following characteristics for the field:

Field name

iiiEmployNotes

Description

Notes

Field type

String

Field length

512

Enabled for RDMLX

Yes

Close

Yes

 

c.  Press the Create button.

     You have now manually created fields Salary, Start Date and Notes.