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

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