Control block execution order in multiple dialogs

This table shows the order in which control blocks are executed in a procedural DIALOG instruction, according to the context and user action:

Table 1. Control block execution order for a procedural dialog
Context / User action Control Block execution order
Entering the dialog
  1. BEFORE DIALOG
  2. BEFORE INPUT, BEFORE CONSTRUCT or BEFORE DISPLAY (first sub-dialog getting focus)
  3. BEFORE ROW (if focus goes to a list)
  4. BEFORE FIELD (if focus goes to a field)
When the focus goes to an INPUTor to a CONSTRUCT from a different sub-dialog
  1. Triggers raised by the context of the sub-dialog you leave
  2. BEFORE INPUT or BEFORE CONSTRUCT (new sub-dialog getting focus)
  3. BEFORE FIELD
When the focus leaves an INPUT or a CONSTRUCT to a different sub-dialog
  1. ON CHANGE (if INPUT and value of current field has changed)
  2. AFTER FIELD (for the current field)
  3. AFTER INPUT or AFTER CONSTRUCT (current sub-dialog losing focus)
  4. Triggers raised by the context of the sub-dialog you enter
When the focus goes to a DISPLAY ARRAY list or to an INPUT ARRAY list from a different sub-dialog
  1. Triggers raised by the context of the sub-dialog you leave
  2. BEFORE INPUT or BEFORE DISPLAY (new sub-dialog getting focus)
  3. BEFORE ROW (the row that was selected in the list)
  4. BEFORE FIELD (if it's an INPUT ARRAY)
When the focus leaves a DISPLAY ARRAY or INPUT ARRAY list to a different sub-dialog
  1. ON CHANGE (if INPUT ARRAY and value of current field has changed)
  2. AFTER FIELD (if it's an INPUT ARRAY)
  3. AFTER INSERT (if INPUT ARRAY and current row was just created)

    or

    ON ROW CHANGE (if INPUT ARRAY and a value in the row has changed)

  4. AFTER ROW (the current row in the list you leave)
  5. AFTER INPUT or AFTER DISPLAY (current sub-dialog losing focus)
  6. Triggers raised by the context of the sub-dialog you enter
Moving from field A to field B in an INPUT or CONSTRUCT sub-dialog or in the same row of an INPUT ARRAY list
  1. ON CHANGE ( if value of current field has changed)
  2. AFTER FIELD A
  3. BEFORE FIELD B
Moving from field A of an INPUT or CONSTRUCT sub-dialog to field B in another INPUT or CONSTRUCT sub-dialog
  1. ON CHANGE (if value of current field has changed)
  2. AFTER FIELD A
  3. AFTER INPUT or AFTER CONSTRUCT (for sub-dialog of field A)
  4. BEFORE INPUT or BEFORE CONSTRUCT (for sub-dialog of field B)
  5. BEFORE FIELD B
Moving to a different row in a DISPLAY ARRAY list
  1. AFTER ROW (the row you leave)
  2. BEFORE ROW (the new current row)
Moving to a different row in an INPUT ARRAY list when current row was newly created
  1. ON CHANGE (if value of current field has changed)
  2. AFTER FIELD (for field A in the row you leave)
  3. AFTER INSERT (the newly created row)
  4. AFTER ROW (the newly created row)
  5. BEFORE ROW (the new current row)
  6. BEFORE FIELD (field in the new current row)
Moving to a different row in an INPUT ARRAY list when current row was modified
  1. ON CHANGE (if value of current field has changed)
  2. AFTER FIELD (for field A in the row you leave)
  3. ON ROW CHANGE (the values in current row have changed)
  4. AFTER ROW (for the row that was modified)
  5. BEFORE ROW (the new current row)
  6. BEFORE FIELD (field in the new current row)
Inserting or appending a new row in an INPUT ARRAY list
  1. Triggers raised by the context of the sub-dialog you leave
  2. BEFORE INSERT (for the new current row)
  3. BEFORE ROW (the new current row)
  4. BEFORE FIELD (field in the new current row)
Deleting a row in an INPUT ARRAY list
  1. BEFORE DELETE (for the current row to be deleted)
  2. AFTER DELETE (now the deleted row is removed)
  3. AFTER ROW (for the deleted row)
  4. BEFORE ROW (the new current row)
Firing the insert or append action for the ON INSERT block in a DISPLAY ARRAY list
  1. AFTER ROW
  2. ON INSERT
  3. BEFORE ROW
Firing the delete action for the ON DELETE block in a DISPLAY ARRAY list
  1. AFTER ROW
  2. ON DELETE
  3. BEFORE ROW
Validating the dialog with ACCEPT DIALOG
  1. ON CHANGE (if focus is in input field and value has changed)
  2. AFTER FIELD (if focus is in input field)
  3. AFTER INSERT (if INPUT ARRAY and current row was just created)

    or

    ON ROW CHANGE (if INPUT ARRAY and a value in the row has changed)

  4. AFTER ROW (if focus is in a list)
  5. AFTER INPUT, AFTER CONSTRUCT or AFTER CONSTRUCT (current sub-dialog)
  6. AFTER DIALOG
Canceling the dialog with EXIT DIALOG None of the control blocks will be executed; we just leave the dialog instruction.