Insert Row Action

Event Function: InsertRow

The Insert Row action inserts one or more rows into a table at the specified point.

Using the Events tab

Under Enter Example

Run Skip Condition

If desired, enter skip conditions for the event. When the "Run Skip Condition" is evaluated to be true, the action is not performed.

Table

Table label

"ABC"

Copy From Row

Table row to copy from (Starting at 1)

1

Insert at Row

Insert at line position (Starting at 1)

3

Copy cells

A yes or no decision to copy the cells from the row identified in the "Copy From Row" field

"Yes" Yes

Number of Rows to Insert

Specify if more than 1 row is to be inserted

2

Syntax (if entering it in the Equation bar

ACTION("InsertRow", expr1,expr2,expr3,expr4,expr5)

Where

expr1 = entry under Table

expr2 = entry under Copy From Row

expr3 = entry under Insert at row

expr4 = entry under Copy Cells (Y/N)

expr5 = entry for number of rows

How the example will appear in the Equation bar

ACTION("InsertRow", "ABC", 3, 1, "Yes",2)

Copies the first two rows of Table ABC, including the cells, and inserts them as the third and fourth rows in the table. The cells in the table will be appropriately renumbered.

Notes

  • If you specify a large number that is outside of the range of the table, such as 9999, as the expression 3 "Insert at row" the row will always be added at the end of the table.
  • If the row you are copying contains a map number that does not pertain to the new row, you can use the Set Value Cell function to clear out the particular cell with the map number in the new row. To see how to use the Set Value Cell function, click here. Add the Set Cell Value as a second action for the event and specify the cell in the row to be cleared.
  • If you rename a table, none of the related events (sort, insert, delete row) for that table gets an updated name. However, you can use the celltable() function to create a reference to the table. If the event is within a table, you can use celltable() to get the table label automatically. If the event is outside of the table, you can use celltable(abc.a1), where abc.a1 is a cell number, to get the table label.

    This function always returns the table label even when table abc is renumbered.

Related Topics