getrow Statement--Get One Row of Data from a Table Field
The getrow statement transfers data from a single table field row to host variables.
This statement has the following syntax:
getrow formname tablename [row]
(variable = columnname {, variable = columnname});
The getrow statement transfers values from table field columns for a specified displayed row into program variables. Getrow validates the row's values before assigning the values to the variables. If there is invalid data, an error message is displayed, the variables are not updated and execution continues with the next statement.
As in the unloadtable and deleterow statements, columnname can also be _state or _record.
This example below shows activate sections using the putrow and getrow statements.
...
exec frs activate menuitem 'PutCurrent';
exec frs begin;
/* Put new information into the current row. */
exec frs putrow empform employee
(age = :age, sal = :sal);
exec frs end;
exec frs activate menuitem 'GetFirst';
exec frs begin;
/* Get information from the first displayed row. */
exec frs getrow empform employee 1
(:age = age, :sal = sal, :state = _STATE);
exec frs end;
...
Last modified date: 08/14/2024