CLEAR FORM

The CLEAR FORM instruction clears all fields in the current form.

Syntax

CLEAR FORM

Usage

The CLEAR FORM instruction clears all form fields of the current form. It has no effect on any part of the screen display except the form fields.

Similar to CLEAR field-list, the CLEAR FORM instruction is typically used when the program is not inside a dialog block execution controlling the form fields. For example, after a database query with a CONSTRUCT instruction, you might want to clear all search criteria entered by the user with this instruction, to cleanup the form.

Note: CLEAR FORM clears the field values and resets the TTY attributes to NORMAL.

The CLEAR FORM instruction is usually not needed, if the program is always in the context of a dialog controlling the form fields.

Example

  CONSTRUCT BY NAME sql
     ON cust_name, cust_address, ...
     ...
  END CONSTRUCT
  CLEAR FORM
  ...