CLEAR field-list
The CLEAR field-list
instruction clears specific
fields in the current form.
Syntax
CLEAR field-list
{ field-name
| table-name.*
| table-name.field-name
| screen-array[line].*
| screen-array[line].field-name
| screen-record.*
| screen-record.field-name
}
[,...]
- field-name is the identifier of a field of the current form.
- table-name is the identifier of a database table of the current form.
- screen-record is the identifier of a screen record of the current form.
- screen-array is the screen array that will be used in the form.
Usage
The CLEAR field-list
instruction can be used to
clear the content of the specified form fields.
The fields to be cleared can be specified individually or by referencing a screen record or screen array, eventually with
the .*
notation to specify all fields.
Similar to CLEAR FORM
, the CLEAR
field-list
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.
CLEAR field-list
clears the field values and resets the
TTY attributes to NORMAL
.The CLEAR field-list
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 s_customer.*
...
END CONSTRUCT
CLEAR s_customer.*
...