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

GetSerNo
Syntax
GetSerNo(filename, str_key);
filename 
str_key
Description
Calculates the next counter value in a number sequence according to a specified key. Returns the next counter value and amends the value to the number sequence.
Returns
A number specifying the next value in a number sequence.
Example
$a="C:\stream\serve\sernofile";
$b="test";
$c=getserno($a,$b);
Contents of the file sernofile:
test0    0
test     10 50
test1    57 50 100
Result:      $c=11
Each line in the file can contain 2, 3, or 4 columns.
column1 = key
column2 = current counter value (incremented after call)
column1 = key
column2 = current counter value (incremented after call)
column3 = maximum counter value (When this number is reached, the counter will be set to zero)
column1 = key
column2 = current counter value (incremented. after call)
column3 = minimum counter value
column4 = maximum counter value (when this number is reached, the counter will be set to the minimum counter value)
OpenText StreamServe 5.6 Updated: 2013-03-01