6 1 Four Ways to Create Fields

LANSA for i

6.1 Four Ways to Create Fields

You can create a new field by:

  • Copying from an existing LANSA field
  • Copying from an external (non-LANSA) field
  • Making existing files known to LANSA
  • Manually entering all the details

Copying from an existing LANSA field

Nominate the field you want to copy from. The existing field's definitions will be automatically copied to the new field. You can also choose to copy all of the validation rules and triggers, help text and multilingual definitions from the existing field, or you can selectively copy the features you need for the new field. You may review the copied details and change them as necessary.

Copying from an external (non-LANSA) field

Simply nominate the field, file and library you wish to copy from, and then add the description, label and so on. You may also add any other Repository features required for the new field.

Making existing files known to LANSA

If your field definitions were created when the files of your existing non-LANSA application were loaded into the Repository, you will use the Modifying Field Definitions steps to add the required LANSA features.

Manually entering all the details

Using the Add Data Dictionary Field screen, you may enter the details required. You can reduce the actual number of entries when manually creating fields by basing your new fields on purpose-built Reference Fields.

Reference Field: You can specify a link from your new field to another field of the same size and type. The linked field is called a Reference Field. This linking allows you to selectively copy the referenced field's validations and associated error messages, help text, rules and triggers, and multilingual definitions to your new field. Linked fields are similar to a copy, except that the two fields are permanently linked together. Should certain aspects of the reference field change, these changes will be automatically reflected in all the fields that are linked to it.

You will find a more detailed description of Reference Fields at the end of this chapter. For further information, refer to Fields in the LANSA for i User Guide.