Script functions reference > Script functions in alphabetical order > G > GetNextSegDoc

GetNextSegDoc
Syntax
GetNextSegDoc(doc_index);
doc_index
Index of the previous document in the current segment in the set of documents sent to the output connector.
num
Description
Returns an index that identifies the next document, in the current segment, in the set of documents sent to the output connector.
Returns
num
0
-1
Example
$doc_index = GetFirstSegDoc();
while(num($doc_index) > 0 )
{
   $invoice=GetSegMetadata($doc_index, "invoice_no");
   $doc_index=GetNextSegDoc($doc_index);
}
OpenText StreamServe 5.6 Updated: 2013-03-01