MoveNext method: Business Interlink class
Syntax
MoveNext()
Description
Use the MoveNext method to support dynamic output. This method moves your cursor to the first column of the next row of the output buffer. You can use this method only after you have used the MoveFirst method: otherwise, the system doesn’t know where to start.
Parameters
None.
Returns
Boolean: True if successfully positioned cursor at the next row of the output buffer, False otherwise.
Example
In the following example, the Business Interlink object name is &MYBI. The example uses MoveFirst to move to the first row of the output buffer, and to the first column, or first field, in that row. The Repeat loop uses MoveNext to go through every row in the output buffer. The For loop processes every field in every row, using the GetFieldCount method to get the number of fields, or outputs, in the row.
/* Add inputs to the Business Interlink object, then call Execute to execute the⇒
Business Interlink object. You are then ready to get the outputs using the⇒
following code. */
If (&MYBI.MoveFirst()) Then
Repeat
For &I = 1 to &MYBI.GetFieldCount
&TYPE = &MYBI.GetFieldType(&I);
Evaluate &TYPE
Where = 1
&STRING_VARIABLE = &MYBI.GetFieldValue(&I);
/* test for and process other field types */
End-Evaluate;
End-For;
Until Not(&MYBI.MoveNext());
Else
/* Process error - no output buffer */
End-If;