Was this helpful?
Clearrow
Clears a row or columns within a row of a table field or a record of an array.
Syntax
clearrow tablefieldname [ [integerexpr] ]
  [(columnname {, columnname})]
clearrow arrayname [integerexpr
  [(attributename {, attributename })]
tablefieldname
Specifies the name of the table field whose row is being cleared. This is a 4GL name (unless you include integerexpr and its enclosing brackets).
arrayname
Specifies the name of the array whose record is being cleared
integerexpr
Specifies an integer expression indicating the row number in the table field or array
columnname
Specifies the name of a column in the specified row. This is a 4GL name.
attributename
Specifies the name of an attribute in the specified array record. This is a 4GL name.
Description
The 4GL clearrow statement clears an entire row of a table field or an entire record of an array, or specified columns within that row or record. The clearrow statement:
Leaves a blank table field row or array record (unlike deleterow, which removes the row and closes up the table field or array).
Clears all columns (except derived columns) unless you specify a columnname.
For table fields, the clearrow statement clears the table field row on which the cursor is currently resting, unless you specify an integer expression. In this case, it clears the row with that number. If you specify one or more columns as well, clearrow clears only those columns. If you have not specified an integer expression, make sure that the cursor is on a table field before executing the clearrow statement.
Because arrays do not have a current row, you must include as the integerexpr the index number of the row you want to clear. If you specify one or more attributes, clearrow clears only those attributes.
Example
Clear the columns called Cost and Total from the third row in the partstbl table field:
clearrow partstbl[3] (cost, total);
Last modified date: 04/03/2024