BEFORE DISPLAY block

The BEFORE DISPLAY block is executed when a DISPLAY ARRAY list gets the focus.

In the singular DISPLAY ARRAY instruction, BEFORE DISPLAY is only executed once when the dialog is started, while the BEFORE DISPLAY block of the DIALOG instruction is executed each time the list gets the focus.

BEFORE DISPLAY is executed before the BEFORE ROW block.

When called in this block, the DIALOG.getCurrentRow() function returns the index of the current row.

In this example the BEFORE DISPLAY block enables an action and displays a message:

   DISPLAY ARRAY p_items TO s_items.*
     BEFORE DISPLAY
       CALL DIALOG.setActionActive("clear_item_list", TRUE)
       MESSAGE "You are now in the list of items"