FIELD item type

Defines a generic form field that can be defined in database schema files.

Important: This feature is deprecated! You must define all form item attributes directly in the form file.

Syntax

FIELD item-tag = field-name [ , attribute-list ] ;
  1. item-tag is an identifier that defines the name of the item tag in the layout section.
  2. field-name identifies the name of the screen record field.
  3. attribute-list defines the aspect and behavior of the form item.

Attributes

COMMENT, DEFAULT, FONTPITCH, HIDDEN, NOT NULL, NOENTRY, REQUIRED, SAMPLE, STYLE, SIZEPOLICY, TAG, TABINDEX, TITLE, UNSORTABLE, UNSIZABLE, UNHIDABLE, UNMOVABLE.

Usage

The FIELD item type defines a generic form field for data input or display. The real item type (i.e. the widget) and the attributes must be defined in the database schema files.

The definition of the form field is determined by the .val database schema file, based on the field-name (table.column). The item type (EDIT, COMBOBOX, etc) is defined by the ITEMTYPE attribute of the .val file.

By using this form field specification, you can centralize the definition of form fields in the database schema file. You can, for example, specify that the "order.state" database column is a COMBOBOX, with a list of ITEMS, as if the field was defined directly in the form specification file.

It is also possible to use the attributes defined in the database schema files with other form item types.

The attributes defined directly in the form specification file take precedence over the attributes defined in the database schema files.

Example

FIELD f001 = order.state, REQUIRED, STYLE="important";