Skip to main content

SEQNUM

Returns an incrementing number each time it is called.
Useful for generating unique sequential identifiers such as invoice numbers, order IDs, or record numbers.

Syntax

SEQNUM(identifier, start_number)

Arguments

  • identifier: A text label used to maintain separate sequences.
    For example, using "invoice" and "order" will create two independent counters.
  • start_number: (optional) The number from which the sequence should start.
    If omitted, it defaults to 1.

Example

SEQNUM("invoice", 1000) → Returns 1000, 1001, 1002, ... each time it runs SEQNUM("order") → Returns 1, 2, 3, ... for the "order" sequence

Each unique identifier maintains its own counter, ensuring that different record types can have independent numbering sequences.