INPUT ARRAY control clauses

Statement block

Order of INPUT ARRAY control clauses

INPUT ARRAY control clauses specify the behavior of the cursor and keys during the input. Each INPUT ARRAY control clause must contain at least one executable statement and the keywords that specify when this statement or statements will be executed.

 

Field list

A list of one or more form fields separated by commas

FieldField

A single form field

Action list

A list that consists of one to four actions separated by commas and enclosed in quotation marks

Key list

A list that consists of one to four key names separated by commas

Seconds

An integer value specifying the number of seconds

Statement

The statement block of the INPUT ARRAY control clause

An INPUT ARRAY control clause can specify:

If the INPUT statement contains at least one INPUT ARRAY control clause, the END INPUT keywords must be included into the INPUT ARRAY statement. If there are no INPUT ARRAY control clauses, 4GL waits until the data are entered to the fields specified in the INPUT ARRAY statement. It is terminated, if the Accept key is pressed.

Statement block

Statement block following each INPUT control clause must include at least one executable statement. It can include these:

While the statements in a control clause are executed, the form becomes inactive. It is reactivated after all the statements within the clause have been executed.

Order of INPUT ARRAY control clauses

INPUT control clauses can be listed in any order. However, 4GL executes them in this fixed order:

  1. BEFORE INPUT

  2. BEFORE ROW

  3. BEFORE INSERT, BEFORE DELETE

  4. BEFORE FIELD screen-array

  5. BEFORE FIELD screen-array.field

  6. ON KEY, ON ACTION, ON IDLE

  7. ON CHANGE

  8. AFTER FIELD screen-array

  9. AFTER FIELD screen-array.field

  10. AFTER INSERT, AFTER DELETE

  11. ON ROW CHANGE

  12. AFTER ROW

  13. AFTER INPUT

 

You can have any number of the ON KEY and ON ACTION clauses, the maximal number of the BEFORE FIELD and AFTER FIELD clauses is limited by the number of fields in specified by the INPUT ARRAY statement. You can have only one BEFORE INSERT, AFTER INSERT, BEFORE DELETE, AFTER DELETE, BEFORE INPUT, AFTER INPUT, BEFORE ROW, and AFTER ROW clause.

 

Within the control clauses you can use the NEXT FIELD, EXIT INPUT and CONTINUE INPUT keywords.

 

BEFORE FIELD and AFTER FIELD clauses as well as the NEXT FIELD keywords refer to the order of fields implied by the screen record in the FROM clause. You can specify the field with the help of a table reference or by prefixing it with the name of a record or an array : array[line].

 

The BEFORE FIELD screen-array and AFTER FIELD screen-array clauses influence the whole screen array, they are executed when the cursor enters or leaves any field that belongs to the screen array. The BEFORE FIELD screen-array.field and AFTER FIELD screen-array.field clauses reference a separate field within the screen array, they are executed when the cursor enters or leaves the specified field.

 

 

 

Contact Us

Privacy Policy

Copyright © 2026 Querix, (UK) Ltd.