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

GetGlobalSerNoRange
Syntax
GetGlobalSerNoRange(key, range);
key
range
Description
Returns the first value in the specified range of serial numbers for the specified key. The specified range is reserved in the repository used by the StreamServer application. This can be useful if you want to avoid a database operation for each retrieval of serial number. Instead you reserve a set of serial numbers at once.
Returns
num
-1
Example
Assume the repository table has the following key entry:
invoices   1234   1000   2000
Where:
First column (invoices) – the key
Second column (1234) – current value
Third column (1000) – minimum value
Fourth column (2000) – maximum value
By issuing the following function:
$ser = getglobalsernorange(“invoices”, 100);
$ser is set to 1234 and the table entry contains:
invoices   1334   1000   2000
OpenText StreamServe 5.6 Updated: 2013-03-01