INPUT ARRAY control blocks execution order

This table shows the order in which the runtime system executes the control blocks in the INPUT ARRAY instruction, according to the user action:

Table 1. Control block execution order for INPUT ARRAY
Context / User action Control Block execution order
Entering the dialog
  1. BEFORE INPUT
  2. BEFORE ROW
  3. BEFORE FIELD
Moving to a different row from field A to field B
  1. ON CHANGE (if value has changed for field A)
  2. AFTER FIELD (for field A in the row you leave)
  3. AFTER INSERT (if the row you leave was inserted or appended)

    or

    ON ROW CHANGE (if values have changed in the row you leave)

  4. AFTER ROW (for the row you leave)
  5. BEFORE ROW (the new current row)
  6. BEFORE FIELD (for field B in the new current row)
Moving from field A to field B in the same row
  1. ON CHANGE (if value has changed for field A)
  2. AFTER FIELD (for field A)
  3. BEFORE FIELD (for field B)
Deleting a row
  1. BEFORE DELETE (for the row to be deleted)
  2. AFTER DELETE (for the deleted row)
  3. AFTER ROW (for the deleted row)
  4. BEFORE ROW (for the new current row)
  5. BEFORE FIELD (field in the new current row)
Inserting a new row between rows
  1. ON CHANGE (if value has changed in the field you leave)
  2. AFTER FIELD (for the row you leave)
  3. AFTER INSERT (if the row you leave was inserted or appended)

    or

    ON ROW CHANGE (if values have changed in the row you leave)

  4. AFTER ROW (for the row you leave)
  5. BEFORE INSERT (for the new created row)
  6. BEFORE FIELD (for the new created row)
Appending a new row at the end
  1. ON CHANGE (if value has changed in the current field)
  2. AFTER FIELD (for the row you leave)
  3. AFTER INSERT (if the row you leave was inserted or appended)

    or

    ON ROW CHANGE (if values have changed in the row you leave)

  4. AFTER ROW (for the row you leave)
  5. BEFORE ROW (for the new created row)
  6. BEFORE INSERT (for the new created row)
  7. BEFORE FIELD (for the new created row)
Validating the dialog
  1. ON CHANGE
  2. AFTER FIELD
  3. AFTER INSERT (if the current row was inserted or appended)

    or

    ON ROW CHANGE (if values have changed in the current row)

  4. AFTER ROW
  5. AFTER INPUT
Canceling the dialog
  1. AFTER ROW
  2. AFTER INPUT