Top  >  Lycia reference  >  Querix 4GL  >  Statements  >  CLEAR

CLEAR

 

Clearing a Field

CLEAR FORM

CLEAR SCREEN

CLEAR WINDOW

 

CLEAR statements are used to clear any of the following display sections:

 

 

CLEAR statements do not change or delete any information in the program, the values cleared from the screen will not be deleted.

 

 

Clearing a Field

 

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

 

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

 

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

 

 

CLEAR WINDOW

 

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.