Understanding the DISPLAY ARRAY instruction
The DISPLAY ARRAY
dialog controls a list of records.
DISPLAY ARRAY
is designed to browse a list of records, binding a static or
dynamic array model to a screen array of the current displayed form.
A DISPLAY ARRAY
instruction supports additional
features such as drag & drop, tree-view management, built-in sort
and search, multi-row selection and list modification triggers.
For a detailed description of these features,
see Table views.
Use the DISPLAY ARRAY
instruction to let the end user browse in a list of rows,
after fetching a result set from the database. The result set is produced with a database cursor
executing a SELECT
statement. The SELECT
SQL statement is usually
completed at runtime with a WHERE
clause produced from a CONSTRUCT
dialog. When the DISPLAY ARRAY
statement completes execution, the program must test
the INT_FLAG
variable to check if the dialog was
validated or canceled. If INT_FLAG
is FALSE
, the program can get
the current row from arr_curr()
.
Depending on the type of DISPLAY ARRAY
, you must implement dialog data blocks.
When the user browses the list, dialog control
blocks such as BEFORE ROW
are executed.
When the user clicks on an action view (button), or when an asynchronous event occurs, dialog interaction blocks like ON ACTION
are executed.
The code inside a DISPLAY ARRAY
dialog can use control instructions, dialog control functions, and the ui.Dialog
class, to implement
the dialog behavior.