COMMENT attribute

The COMMENT attribute defines hint for the user about the form element.

Syntax

COMMENT = [%]"string"
  1. string is the text to display, with the % prefix it is a localized string.

Usage

The most common use of the COMMENT attribute is to give information or instructions to the user.

The COMMENT attribute can be used for different sort of form elements:
  • Form field definitions, to show a message when the field gets the focus.
  • Action views, to give a hint to the user about the action.
With form fields, this attribute is particularly appropriate when the field accepts only a limited set of values. The screen location where the message is displayed depends on external configuration. It can be displayed in the comment line, or in the status bar when using a graphical user interface. If the OPEN WINDOW statement specifies COMMENT LINE OFF, any output to the comment area is hidden even if the window displays a form that includes fields that include the COMMENT attribute.

This attribute is also an action attribute that can be defined in the ACTION DEFAULTS section of a form or directly in an action view (BUTTON), see COMMENT action attribute for more details.

Example

-- As action default
ACTION DEFAULTS
  ACTION print (COMMENT="Print current order information")
END

-- In a form field definition
EDIT f1 = customer.name, COMMENT = "The customer name";

-- In a form buttom
BUTTON b1: print, COMMENT = "Print customer details";