Was this helpful?
Insertrow
Inserts a new row into a table field or a new record into an array.
Syntax
insertrow tablefieldname [ [integerexpr] ]
  [(columnname = expression{, columnname =
    expression})]
  [with(display_attr(columnname)=attr_value
    {, display_attr(columnname)=attr_value})]
insertrow arrayname [integerexpr]
  [( attributename = expression{, attributename =
    expression})]
tablefieldname
Specifies the name of the table field that is receiving a new row or record. This is a 4GL name (unless you have included integerexpr and its enclosing brackets).
arrayname
Specifies the name of the array that is receiving a new row or record
integerexpr
Specifies a value indicating the row number after which the new row is to be inserted. It refers to a row in the table-field display rather than to a row in the data set, or to a record of the array.
columnname
Specifies the name of a column in the new row or record; a 4GL name. Can be a string constant or string variable.
You can assign values to table-field columns with insertrow. If you omit the assignment of expressions to columns, the new row appears empty.
You can specify the special FRS attribute _state as a column name. Do not specify the FRS attribute _record. _State and _record are discussed in Writing 4GL Statements.
attributename
Specifies the name of an attribute in the new record; a 4GL name. Can be a string constant or string variable.
You can assign values to array attributes with insertrow. If you omit the assignment of expressions to attributes, the new row appears empty.
You can specify the special FRS attribute _state as an attribute name. Do not specify the FRS attribute _record. _State and _record are discussed in Writing 4GL Statements.
display_attr
Specifies the display parameter to be assigned to the specified column. The display attribute can be reverse, blink, underline, intensity or color.
attr_value
Specifies the value for the display parameter. For color, the value is an integer from 0 to 7. For other display attributes, the value is 1 to turn the parameter on or 0 to turn the parameter off. For more details, see the section, Set_forms.
Description
The 4GL insertrow statement inserts a new row or array record following the row or record you specify by an integer expression. If the expression evaluates to 0, the new row or record is inserted at the top of the table field or array. For table fields, you can omit the integer expression, in which case the row is inserted just after the row on which the cursor rests.
Last modified date: 08/14/2024