appendRow()

appendRow() is used to append a row to the end of the current list. The method, when executed, does not initiate any AFTER ROW / BEFORE ROW or AFTER INSERT / BEFORE INSERT actions or set a new row selection. The method performance is similar to appending a new row to the program array. The difference is that the internal registers are updated automatically. If multi-row selection is enabled in the current dialog, the selected rows will stay selected after the method execution. The new row appears unselected at the end of the list. appendRow() does not move cursor to the new row, nor the focus is switched to the list.

appendRow() must not be used in AFTER ROW / BEFORE ROW, AFTER INSERT / BEFORE INSERT, AFTER DELETE / BEFORE DELETE blocks.  However, you can use it in an ON ACTION block.

AppendRow() is used only to add a new row to the current screen array list and does not fill it with any values.

The method needs one argument:

DIALOG.AppendRow("screen_array")

The screen_array argument specifies the name of the screen array identifying the list to which the new row is to be appended.

There is some specifics about using variables with ui.Dialog methods.

You can learn about them here.

This snippet of the source code adds a number of new rows:

ON ACTION add_rows

  LET num = fgl_winprompt (5, 5, "Enter the number of rows to be added", "1", 5, 2)

    FOR i = 1 TO num

      CALL DIALOG.AppendRow("scr_arr")

    END FOR

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.