AutoGenId¶
Generates a sequence of unique identifiers, optionally sized by another multi-sized field.
Creates an ID sequence. Without parameters, the sequence is unique to the
field the rule is placed on. With a string parameter, the sequence is
named and global — usable across tables and storable across runs via the
StoreSequence table rule.
AutoGenId works with multi-sized results and can be forced to produce a
fixed number of results by specifying a limit. To match an unlimited
multi-sized field elsewhere, supply that field as the first parameter so
AutoGenId produces the same number of results.
Parameters¶
- 1 —
sourceOptional — accepts: field -
A field whose multi-sized result size determines how many ids to generate. Required only when matching an unlimited multi-sized result.
- 2 —
sequenceNameOptional — accepts: STRING -
The name of a global sequence. Named sequences are shared across tables and can be persisted between runs using
StoreSequence.
Input type¶
Does not accept input.
Output type¶
INT[]
Requires¶
- Allows multi-sized results.
Examples¶
Per-field local sequence
Per-field local sequence, exactly 2 ids
Sized by another multi-sized field
Named global sequence
Named global sequence, exactly 5 ids
Named global sequence sized by another field