GetCount method: Business Interlink class
Syntax
GetCount(docname)
Description
The GetCount method returns the number of documents within a document list contained within an output structure for a Business Interlink object.
Parameters
| Parameter | Description |
|---|---|
|
docname |
The name of the document list. |
Returns
The number of documents in the list.
Example
In the following example, the output structure for Calculate Cost, or the root level document, is accessed with the GetOutputDocs method. The Calculate Cost output parameter output_param2_List is a document, so the GetDoc method gets it from the output structure. Because output_param2_List is a document list, GetCount gets the number of documents in the list.
Local Interlink &QE_COST;
Local number &count;
Local BIDocs &CalcCostOut;
Local BIDocs &OutlistDoc;
Local number &ret;
&QE_COST = GetInterlink(Interlink.QE_COST_EX);
/* Get inputs, execute. (code not shown) */
&CalcCostOut = &QE_COST.GetOutputDocs("");
/* Call GetValue for output_param1, call GetDoc, GetValue for
Service_Rate (code not shown) */
&OutlistDoc = &CalcCostOut.GetDoc("output_param2_List");
&count = &CalcCostOut.GetCount("output_param2_List");
&I = 0;
While (&I < &count)
&ret = &OutlistDoc.GetValue("output_member1", &VALUE1);
&ret = &OutlistDoc.GetValue("output_member2", &VALUE2);
If &ret = 0 Then
/* Process output values */
&I = &I + 1;
&retoutput = &OutlistDoc.GetNextDoc();
End-If;
End-While;
The following example shows the output structure for this example. It contains three output parameters: output_param1, Service_Rate, and output_param2_List.
