Manage Virtual Fields

In this document the methods are described for defining virtual fields in 'Virtual Fields. Connect' (CMS012) for fields that do not exist in any BE table. Use alternative 12='Virtual fields' (Ctrl+12) in these programs to launch (CMS012):

Follow these steps

The naming convention for a virtual field is &XXXX.

  1. On (CMS012/B), specify the virtual field ID and use alternative 1='Create'.

  2. Specify a name for a virtual field by entering either a description or a message ID. If you specify a description, it can also be defined per language by clicking the 'Language' button. If you specify a message ID, the column heading is automatically displayed in the end user's M3 language.

  3. Define a field type. Use these alternatives:

    1 = Value calculated by a formula

    2 = Value retrieved by a function program

    3 = Value from a description field in CSYTAB

    4 = Value from a name field in CSYTAB

    5 = Value from a currency conversion

    6 = Value from a logical formula

    7 = Date conversion

    8 = Merge data

  4. Specify a 'Calc sequence'.

    The calculation sequence is used if other virtual fields are used as objects in the calculation formula. The current virtual field must have a higher calculation sequence than the virtual fields used as objects in the calculation formula. The number of decimal places is controlled either by specifying the number of decimal places (0–4) or selecting a field information code.

  5. Click 'Next' to activate the virtual field.

Value calculated by a formula

The value is calculated based on fields from the master table, related tables, or other virtual fields. Specify the calculation formula by entering a value for 'Operator' (+, -, /, *), 'Object' (field from master table, related table, or other virtual field), and 'Factor'.

Value from description or name field in CSYTAB

The value is retrieved from the 'Description' or 'Name' field in the system table CSYTAB.

You can also perform a quick entry to define a virtual field for the name from the related system table (CSYTAB):

  1. Click 'Related System Table' on (CMS012/E).

  2. Specify the key value (for example MMCUCD for the currency code name based on MITMAS).

  3. Click OK.

Value from a currency conversion

The value is retrieved from a currency conversion.

Specify the read option for these fields:

Value from a logical formula

Values are displayed (or not) based on a logical formula.

Specify this information:

Date conversion

Convert a date to a unique serial number. The serial number starts by 1 on the first day in the system calendar. By using two virtual fields for a date in a virtual field for calculation, it is possible to calculate the difference between two dates. It is also possible to decide whether the unique sequence number should include all days, only working days, or only banking days.

Specify this information:

Merge data

The value is merged from different fields into one field, for example to display an order number and an order line number in the same field like this: 3953987-0020. Up to five different sections may be merged into the new virtual field. For every section, a number of parameters are specified.

Specify the following information:

Outcome

You may define an unlimited number of virtual fields. When created, the field group is updated with this field. The virtual fields can be selected as fields (columns) in the list.

Related topics