QDoc Iterations
Iterations are steps through the data nodes, such as sales order lines, of a given inbound QDoc. These nodes and their contents are passed into the Progress calling program as an X-DOCUMENT. The input parameter pQDoc is a handle to the Progress X-DOCUMENT. The custom program can access the nodes within this X-DOCUMENT and carry out any validation required. Note: The custom program is not given access to all of the QDoc, only the current iteration node.
For example, a preprocessing program for SOLine iterates on each sales order line. In the sample portion of the QDoc below, the bold salesOrderLineDetail iteration is the current iteration when the event triggers for sales order line 1. When the event triggers for sales order line 2, the italic salesOrderLineDetail iteration is the current iteration. The following example has been edited for simplicity—lines where three periods appear (...) show where lines have been removed....
<salesOrder>
<soNbr>dql0009 </soNbr>
<soCust>1012000</soCust>
<soConsignment>no</soConsignment>
<salesOrderLineDetail>
<line>1</line>
<sodPart>ALX001</sodPart>
<sodtaxable1>no</sodtaxable1>
<sodcmmts>no</sodcmmts>
</salesOrderLineDetail>
<salesOrderLineDetail>
<line>2</line>
<sodPart>ALX002</sodPart>
<sodtaxable1>no</sodtaxable1>
<sodcmmts>no</sodcmmts>
</salesOrderLineDetail>
</salesOrder>
</maintainSalesOrder>