Was this helpful?
Validrow
Performs a validation check on the columns in a specified row in a table field.
Syntax
validrow tablefieldname[[integerexpr]] 
  [(columnname {, columnname})]
tablefieldname
Specifies the name of the table field subject to validation. This is a 4GL name (unless you have included integerexpr and its enclosing brackets).
integerexpr
Specifies the number of the row in the table field to be validated
columnname
Specifies the name of the column to be validated in the specified row. This is a 4GL name.
Description
The 4GL validrow statement performs a validation check specified for a table-field row on the current form. Validations are specified through the ABF FormEdit operation to access VIFRED. If a column fails a check, an error message is displayed.
The validrow statement performs a validation check immediately upon execution, independent of any action taken by you. This differentiates validrow checks from those set by the set_forms frs (validate) statement, which take place when you perform an action (such as moving to the next or previous field).
The validrow statement validates the row on which the cursor is currently resting unless an integer expression is specified in brackets. In this case, it validates the row with that number. Make sure that the cursor is on the table field if you execute validrow without specifying an integer expression.
If a list of columns is specified in the validrow statement, only the values in those columns are validated. Omitting the column list causes all columns in the row to be validated.
Validrow is disallowed for arrays, because arrays do not have validations.
Examples
Validate the current row in the Partstbl table field:
validrow partstbl;
Validate the columns called Partno and Cost in the third row in the table field called Partstbl:
validrow partstbl[3] (partno, cost) ;
Last modified date: 01/30/2023