Counter Setup

Counters provide a persistent means to create incremental unique Id's for transactions generated within IMan.

Counters can be used for a variety of purposes such as Duniquely assigning transactions or generating account identifiers.

The GetCounterSequence function provides the means to generate the next number from the sequence.

The result of which will be in the format:

<Prefix><Padded Counter Value><Suffix>

Setup > Counters

Counter Id

The unique Id of the counter.

This value is used to reference the counter in the GetCounterSequence formula (see Lookup & Data Cleanse Functions).

Description

A useful description for the specified counter.

Counter Prefix

The value prefixed to the start of the counter.

Counter Suffix

The value appended to the end of the counter.

Evaluate Key & Formula

A single counter setup has facility to maintain one or multiple sequences.

When the evaluate key is selected, the formula field is evaluated to find the reference to a counter detail record. This means that the counter detail sequence is identified using the result of the formula field.

If a record is found, the counter formula obtains the next number.

If a record is not found, a new detail record is created and the return value is set to the counter’s starting value.

The formula field is an inline function returning a value. The formula field may contain expanding field references. For example, a Date parameter formula could be substituted for a reference to a field within a transaction type. For example:

Format(%InvoiceDate, “yyyymm”)

This type of counter is useful when there is a requirement for a resetting value. For example, if the counter needs to reset every month based on invoice date.

Step

The value to increment the counter on each call. This may be either a positive or negative number.

Starting Number

The value to start the counter, e.g. 9000.

For counters using the evaluation functionality, each time a new counter detail is created its initial value will be this.

Total Counter Length

The total length of the resultant number.

The counter function pads the counter number value with leading zeros to fill the length. If the counter value exceeds the length an error is generated during transform.

In the example the total counter length is 12, giving numbers counter results such as WEB000009010, WEB000009011, WEB000009012, etc.

Next Sequence (Read Only)

Will display the next in sequence for pre-existing counters.