Was this helpful?
clearrow Statement--Clear Data from a Field
This statement clears data from a row in the table field.
Syntax
clearrow formname tablename [row]
    [(columnname {, columnname})]
Description
The clearrow statement clears some or all of the column values from a single row in a table field display and sets the change variable of each cleared column to 0. This statement does not delete a row, but simply clears its values.
This statement does not clear derived columns directly. That is, the clearrow statement skips any derived columns when you clear all the columns. Additionally, the statement does not accept a derived column name in its column list. However, when you clear a source column of a derived column, the value in the derived column is then invalid and is cleared also. (For a discussion of derived and source columns, see Table Fields.)
By default, after you execute a clearrow statement, the nullable columns contain blanks. You can override this default by defining II_NULL_STRING. When you do so, the value contained in II_NULL_STRING is placed in the nullable columns instead of blanks.
Formname is the name of the form in which the table field tablename is displayed. You can use quoted or unquoted character strings or program variables to specify formname and tablename.
Row is the number of the displayed row to be cleared. It can be either an integer literal or an integer program variable. The row must be in the range from 1 to the number of displayed rows for the table field as specified in VIFRED. If it is omitted, the row on which the screen cursor currently rests is cleared.
If you include the columnname list, the statement clears only the values in the specified columns for the specified row. Columnname can be specified using a character string, with or without quotes, or as a program variable. You cannot specify a derived or hidden column.
If you want to remove all rows in a data set, use the clear statement; use the deleterow statement to delete a row.
Examples--clearrow statement:
Example 1:
Clear all values in the current row.
exec frs clearrow empform employee;
Example 2:
Clear the ename column in the first displayed row.
exec frs clearrow empform employee 1 (ename);
Last modified date: 08/14/2024