Skip to main content

Extended documentation → Scopevisio Documents Workflow Administration → Configuration → Counters

Updated over a month ago

What are counters?

Basic function

Counters allow values to be incremented automatically. For example, document numbers are automatically incremented when the counter is inserted in a "Document number" field.

image-20250903-102516.png

Create and configure counters

Basic settings

You must make the following settings for each counter:

Short name

The short name has the same format as the short name in archives or data fields.

Format: Only lower case letters, numbers and underscores are permitted.

Name

You can freely assign the name.

Start value

Define the start value at which the counter should begin.

Increment

In the "Increment" field, set the amount by which the counter should continue counting after the start (e.g. by 1, 2, 5 etc.).

Function: The increment determines by how much the value increases each time the counter is used (from the start value).


Automatic reset

Periodic reset

You can use the "Automatic reset" option to set the counter to be reset to the start value fully automatically.

Available options:

  • At the beginning of a month

  • At the beginning of a year

  • On a specific day

Specific day

Counters can be reset using the "Specific day" criterion.

This is how it works:

  • When you select this option, a mandatory field is displayed

  • You fill the field with the specified format with a day and a month

Example: If you want to start from 1 every year, you can set this here.

Manual reset

You can also reset a counter manually.

Security prompt: There is a security prompt when resetting the counter. The value is only reset when the counter short name is entered.

Use case: If you have defined a counter and tested it with a test document, you can reset the test value here.


Using counters in data fields

Assigning a counter to a data field

Under Archive → Data fields → Options → Default value, you can set for which data fields in which archive this counter should be set up.

Two options for use

There are two different ways to use a counter as a default value in the data fields:

1. simple counter

The "Counter" option is available in data fields of type number, integer and text. All configured counters can be selected here.

2. formatted value

In data fields of type Text, counters can also be freely formatted. This means that you can use them together with other text and other predefined values.

To activate this option: Select the "Formatted value" option.


Use formatted counters

Formatting syntax

In the text field, you must enter the text in the Python formatting syntax. Placeholders for dynamic values are entered in curly brackets.

Supported placeholders

The following placeholders are supported:

  • {year}

    for the current year

  • {month}

    for the current month

  • {day}

    for the current day

  • {counter.xyz}

    for counters, where xyz is the short name of the counter used

Special formatting

These numerical values can also be specially formatted using additional rules (e.g. with leading zeros).

Example of a formatted counter

Objective: Text such as "AB-2019-00123" should be entered in the data field.

Explanation:

  • 2019 is the current year

  • 00123 is the counter value, extended to 5 digits with zeros

The rule for this is:

AB-{year}-{counter.test:05d}

Explanation of the formatting:

  • The

    :05d

    after a placeholder cause the leading zeros before the counter value

  • The value is always 5 digits long

  • The counter with the short name "test" is used


Counter when archiving

Automatic filling

In the default values of the data fields, it is possible to automatically fill the data field with an incrementing value when archiving. This means that all archived processes are numbered uniquely.

Split counters

The counters used for this must be set up manually. This also makes it possible:

  • Use counters shared by different archives

  • Use different counters in different data fields


Option "No manual input"

Problem with normal default values

Normally, the default values are already pre-filled when a user opens the archive dialogue. This could lead to unsightly behaviour with counters:

Problematic behaviour:

  1. As soon as the counter is displayed in the Archive dialogue, the last counter value is already "used up"

  2. If the user now cancels the dialogue and reopens it later, a new counter value is entered

  3. Gaps in the counter values can occur in the archive

Solution: "No manual entry"

In addition, it should often not be possible for users to adjust the counter value in the data field themselves.

Recommended configuration: In this case, you should configure the data field with the "No manual input" option.

Behaviour with "No manual input"

This option leads to the following behaviour:

  • The user can no longer enter anything here in the archive dialogue

  • The default value is only entered automatically at the time of actual archiving

  • If a user cancels archiving beforehand, no counter value is "consumed"

Recommendation

Important recommendation: It is recommended to activate the "No manual entry" option if counters are used in the data field.

Advantage: The server can thus ensure that the same counter value is never entered for two different processes.

Did this answer your question?