4 4 6 Steps to Create Virtual Fields

Visual LANSA

4.4.6 Steps to Create Virtual Fields

Virtual fields are part of a file definition in the repository and are accessed while working with a specific file.  Remember that the virtual field, like any field in a file, must be defined to the repository before you add it to a file. If you follow the recommended naming standards, virtual fields are easily identified as they are nine characters long (xxxxxVIR). (Refer to Field Naming Standards.)

If the virtual field is derived using code, you will need to indicate this using the appropriate input field/option. For the IBM i, virtual code is written in RPG while C is used for other platforms such as Windows.

It is recommended that you review the 4.4.7 Virtual Field Considerations before using virtual fields.

The procedure for creating a virtual field using the extended definition is as follows:

1.  Check that the field is defined in the repository.

2.  Add the field to the file as a virtual field.

3.  Select the type of virtual field.

4.  Add the details of the virtual field.

Once defined to the file, you may add validation rules for the virtual fields.

Also See

Virtual Field Definition in the Technical Reference Guide

Field in File tab in the User Guide

Ý 4.4 Virtual Field Development