Record Count
Functoid:
Use the Record Count functoid to generate a count of the
number of times a particular repeating structure occurs in an input instance
message.
Input:
Parameter 1: A link
from a node in the source schema. For this functoid to do something
interesting, the structure in an input instance message that corresponds to
this node must be repeating. Otherwise, the output is always one (1).
Output:
Output 1: A number
that corresponds to the number of occurrences of the repeating structure in an
input instance message that corresponds to the node specified by parameter 1.
Note:
You can also use the Record Count functoid to count
repeating field elements. It is not restricted to records.
Example:
Source Document:
- <ns0:PO
xmlns:ns0="http://BTSMar13.CountInput">
- <Items>
<SKU>001</SKU>
<Description>Item1</Description>
</Items>
- <Items>
<SKU>002</SKU>
<Description>Item2</Description>
</Items>
- <Items>
<SKU>003</SKU>
<Description>Item3</Description>
</Items>
- <Items>
<SKU>004</SKU>
<Description>Item4</Description>
</Items>
- <Items>
<SKU>005</SKU>
<Description>Item5</Description>
</Items>
</ns0:PO>
Record Count Destination Document:
- <ns0:Count
xmlns:ns0="http://BTSMar13.CountOutput">
- <Details>
<TotalRecords>5</TotalRecords>
</Details>
</ns0:Count>
Please note that Items record in
the Destination Document should be unbounded as we are expecting multiple
occurrences.