Top > Lycia reference > Querix 4GL > Statements > CLEAR
To meet your needs, we constantly work to improve Querix products.
This means that Lycia documentation is developing as well.
In case you have found a certain dissonance between the provided information and the actual behavior of Lycia 3 and/or your applications, please, let us know about this via documentation@querix.com so that we can introduce the necessary changes to our documentation.
Thank you for your attention and cooperation.
CLEAR statements are used to clear any of the following display sections:
4GL screen (not including 4GL windows)
A specified 4GL window
All of the fields of the currently active form
One or more specified fields in the currently active form
CLEAR statements do not change or delete any information in the program, the values cleared from the screen will not be deleted.
To clear a specified field or fields of a screen form, use the CLEAR keyword followed by the filed list.
Element |
Description |
Field Name |
One or more fields of the current screen form separated by commas. |
Record Name |
The name of a screen record |
Character Expression |
A character expression returns one or more (separated by comma) field names |
The field names should be separated by commas, if the field list contains of more than one field. The example below clears two fields of a screen form: name and country. The values of any other field of the same form will remain in their places.
CLEAR name, country
To clear all the fields of a screen record, use the screen_record.* notation. The example below clears all the fields that are linked to the order_info table within the currently active form:
CLEAR order_info.*
If you want to clear all the fields associated with a database table, use the table.* notation instead of the record.*.
The next example clears all the fields that are not associated with a table column and thus belong to the default screen record formonly:
CLEAR formonly.*
CLEAR FORM statement clears all the fields of the current form but does not affect the other parts of display and other sections of the window in which the form has been opened.
To clear one or several fields of the form use CLEAR <field-list> statement.
CLEAR FORM
CLEAR SCREEN option is used to make the 4GL screen the current window (that is to move it to the top of the window stack), and after that to clear it.
The PROMPT, MESSAGE and ERROR lines will also be cleared.
CLEAR SCREEN
To clear a specified 4GL window, which does not need to be the current window, use the CLEAR WINDOW statement:
Element |
Description |
Window Name |
A name of the window you want to clear. It must be the same name which have been used in the OPEN WINDOW statement |
If the window specified with the CLEAR WINDOW statement has a border, the border will still be displayed. CLEAR WINDOW statement does not depend on which window is currently active.