DISPLAY ARRAY modification triggers

The DISPLAY ARRAY dialog can be defined with specific clauses to let the user add, modify and remove rows in the record list.

The DISPLAY ARRAY dialog supports the following modification triggers to manage record list modification:
  • ON APPEND: The ON APPEND trigger defines an action named "append", which is dedicated to row creation at the end of the record list.
  • ON INSERT: The ON INSERT trigger defines an action named "insert", which is dedicated to row creation at the current position in the record list.
  • ON UPDATE: The ON UPDATE trigger defines an action named "update", dedicated to row modification of the current row of the record list.
  • ON DELETE: The ON DELETE trigger defines an action named "delete", to remove the current row of the record list.

Note that the update and delete actions are implicitly defined a row-bound actions (ROWBOUND action attribute), as these need a current row to be fired. If there is not current row, these actions are automatically disabled.

With DISPLAY ARRAY modification triggers, best practice is to use the UNBUFFERED attribute, and define the "update" action with the DOUBLECLICK attribute, as the action to be fired when the user selects a row with a mouse double-click:
  DISPLAY ARRAY custarr TO sa_cust.*
          ATTRIBUTES(UNBUFFERED,
                     CANCEL = FALSE,
                     DOUBLECLICK = update)