contents.gifindex.gifprev1.gifnext1.gif

Get_Next_Sequence_Number

Purpose

Returns a unique incrementing number within a given name parameter. This function is typically used when writing rules for the creation of object IDs.

Arguments

Get_Next_Sequence_Number( <Name> , <Scope> )

This function uses these arguments:

Name
the name of the sequence number which is desired to be incremented. Name is currently limited to 18 characters. This can be increased in the future.
Scope
<Scope> must be one of the following values:

"Global": When used in production, the sequence number returned is persistent across all rules executions for the owner_key under which rules are being executed. When used in test, the sequence number is reset each time the rules are compiled and its previous persistent value is ignored (and not overwritten).

"Batch": The sequence number is not stored persistently, and is reset each time rules are compiled.

"Focus": The sequence number is not stored persistently, and is reset each time a new freight bill is brought into focus.

Notes

All sequence numbers are long integers and increment by one from call to call. The first sequence number returned after a reset is always 1, unless the <scope> is "Global" and rules are being run in production.