GetSequence

You can use this function for Optiva Workflows.

Purpose

Generates the next sequence number.

Syntax


Dim getSequence as Long = GetSequence(“SetType”, integer)

Arguments

Part Description
SetType as string A grouping identifier that enables you to maintain multiple sequences within the system.
Increment as Integer Controls what the sequence is incremented by. Typically this value is 1, but it can be other positive integer values.

Description

This function is used to generate the next sequence number. The SetType does not have to be created in the system. It is an arbitrary string.

Suppose two departments want to use sequence numbers. You can create unique numbers for each department. For example, you can use the name of the department.

Example

This syntax generates the next number in the “aSET” sequence, incrementing it by 1.


Dim getSequence as Long = GetSequence(“aSET”, 1)

You can keep an arbitrary number of sequences by this method. For example, “Sequence1”, “Sequence2”. You can increment it by any amount (1 or greater; use only positive integers).