deleteRow() is used to delete a row from the specified screen array list. The row selection is not influenced by the method. The method performance is similar to deleting rows from the program array. The difference is that the internal registers are updated automatically.
The method execution does not initialize the actions specified in AFTER ROW / BEFORE ROW or AFTER DELETE / BEFORE DELETE control blocks, except for some cases. The BEFORE ROW / BEFORE FIELD control blocks are executed if deleteRow() deletes the currently selected row during execution of an INPUT ARRAY or DISPLAY ARRAY statements which have the focus.
One shouldn’t include the deleteRow() method to BEFORE ROW, AFTER ROW, BEFORE DELETE, AFTER DELETE, BEFORE INSERT, AFTER INSERT control blocks. However, the method is allowed in an ON ACTION block.
The method syntax is:
CALL DIALOG.DeleteRow("screen_array", index)
screen_array |
passes the name of the screen array which identifies the list |
index |
specify the index of the row to be deleted. The method performs no actions if index is set to 0 |
If deleteRow() deletes the last row in an INPUT ARRAY list, a temporary row is automatically appended so that the user can enter new data. No temporary row is added if there is AUTO APPEND = FALSE attribute. In this case, the current row register will be changed in order to prevent it from being greater than the total number of rows.
There is some specifics about using variables with ui.Dialog methods.
You can learn about them here.