InsertRow

Mon 01 January 2018

Syntax

InsertRow(scrollpath, target_row [, turbo])

where scrollpath is:

[RECORD.level1_recname, level1_row, [RECORD.level2_recname, level2_row, ] RECORD.target_recname

To prevent ambiguous references, you can also use SCROLL. scrollname , where scrollname is the same as the scroll level’s primary record name.

Description

Use the InsertRow function to programmatically perform the ALT+7 and ENTER (RowInsert) function.

Note: This function remains for backward compatibility only. Use the InsertRow method of the Rowset class instead.

InsertRow inserts a new row in the scroll buffer and causes a RowInsert PeopleCode event to fire, followed by the events that normally follow a RowInsert, as if the user had manually pressed ALT+7 and ENTER.

In scrolls that are not effective-dated, the new row is inserted after the target row specified in the function call. However, if the scroll is effective-dated, then the new row is inserted before the target row, and all the values from the previous current row are copied into the new row, except for EffDt, with is set to the current date.

Note: InsertRow cannot be executed from the same scroll level where the insertion will take place, or from a lower scroll level. Place the PeopleCode in a higher scroll level record.

Parameters

Field or Control

Definition

scrollpath

A construction that specifies a scroll level in the component buffer.

target_row

The row number indicating the position where the new row will be inserted.

turbo

Specifies whether default processing is performed on the entire scroll buffer (non-turbo mode) or just the row being inserted (turbo mode). Pass a value of True to perform processing in turbo mode. Non-turbo mode is the default.

Returns

Optionally returns a Boolean value indicating whether the function executed successfully.