Script functions reference > Script functions in alphabetical order > C > CreateGlobalSerNo

CreateGlobalSerNo
Syntax
CreateGlobalSerNo(key, initial, min, max);
key
initial
The initial value of the serial number. The first call to GetGlobalSerNo or GetGlobalSerNoRange will return this number, for subsequent calls it will be incremented by one. See GetGlobalSerNo, and GetGlobalSerNoRange.
min
The minimum value of the created serial numbers. Specify -1 to not use a minimum value. If a maximum value is specified and if that maximum value is reached, the serial number counter will start again from the minimum value. If no minimum value is used, the counter will start again from 0.
max
The maximum value of the created serial numbers. If this value is reached, the counter will start again from the minimum serial number or 0, depending on the min value. Specify -1 to not use a maximum value.
Description
Creates a new serial number key in the repository. This key can be accessed by all StreamServer applications running in a specific application domain.
Returns
A number indicating whether the serial number key was created succesfully or not, or if it already exists..
0
1
-1
Example
createglobalserno(“invoices”, 1000, 1000, 2000);
This function creates the following serial number key entry in the repository table:
invoices   1000   1000   2000
Where:
First column – the key
Second column – initial value
Third column – minimum value
Fourth – maximum value
Note:
OpenText StreamServe 5.6 Updated: 2013-03-01