GetFieldCount method: Business Interlink class

Syntax

GetFieldCount()

Description

Use the GetFieldCount method to support dynamic output. It returns the number of columns in the output buffer, which is the same as the number of outputs in each row of the output buffer.

Note:

This method can also be used with hierarchical doc data.

Parameters

None.

Returns

The number of columns in the output buffer, which is the same as the number of outputs in each row of the output buffer.

Example

The following example moves to the first column, first field of the output buffer. The Repeat loop goes through every row in the output buffer. The For loop processes every field in every row.

If (&MYBI.MoveFirst()) Then 
   Repeat 
      For &I = 1 to &MYBI.GetFieldCount 
         &TYPE = &MYBI.GetFieldType(&I); 
         Evaluate &TYPE 
         Where = 1 
            /* do processing */ 
         .  .  . 
         End-Evaluate; 
      End-For; 
   Until Not (&MYBI.MoveNext()); 
Else 
   /* do error processing - output buffer not returned */ 
End-If;