GetRow method: Rowset class
Syntax
GetRow(n)
Description
GetRow returns a row object from a rowset. This is a default method for rowsets. This means that any rowset object, followed by a parameter list, acts as if GetRow is specified.
Parameters
| Parameter | Description |
|---|---|
|
n |
An integer identifying a row within the rowset object. This must be >= 1 and <= the number of rows in the rowset (see property RowCount). |
Returns
Returns a row object for the specified row of the rowset.
Example
In the following example, all of the lines of code do the same thing: they return the 5th row from the rowset (&ROWSET is a rowset object.)
&ROW = GetRowset().GetRow(5);
&ROW = GetRowset()(5);
&ROW = &ROWSET.GetRow(5);
&ROW = &ROWSET(5);
The following example loops through all the rows in a rowset:
Local rowset &LEVEL1;
Local row &ROW;
&LEVEL1 = GetRowset(SCROLL.EMPL_CHECKLIST);
For &I = 1 to &LEVEL1.ActiveRowCount
&ROW = &LEVEL.GetRow(&I);
/* do some processing */
End-For;
Related Topics