Auto Increment Number Field module

This configuration module permits you to define different increment counters with a prefix for fields in modules and then apply them with conditions using workflows. It will permit you to have various counter/increment fields on any module or increment differently the same field depending on values in the record being saved.

Name:
tsolucio/AutoNumberPrefix
Type:
corebos-module
Description:
This configuration module permits you to define different increment counters with a prefix for fields in modules and then apply them with conditions using workflows. It will permit you to have various counter/increment fields on any module or increment differently the same field depending on values in the record being saved.
Keywords:
autoincrement, identifier, field, settings, customnumber, counter
Version:
1.0
Home Page:
http://corebos.org/documentation/doku.php?id=en:extensions:extensions:autonumberprefix
Release Date:
2015-11-02
License:
Vizsage
Price:
120eur
Purchase EMail:
paypal(at)tsolucio(dot)com
Distribution:
Sale
Author Name:
JPL TSolucio, S.L.
Author EMail:
info(at)tsolucio(dot)com
Support EMail:
info(at)tsolucio(dot)com


Configuration

You can create as many “counter” records as you need. They are created in the module's interface as any other record in any other module. The important fields are:

FieldTypeValues
PrefixstringThis is the text prefix that will be added to the start of the identifier. It is totally equivalent to the text prefix you can find in the default autonumbering in Settings. It may be left empty.
Modulemodule multi-listThis is the module that the counter is for.
Formatstringsee below
ActivecheckboxIndicates if the counter is active or not. Any record marked as inactive will not be used by the extension.
Current ValuenumberThis is the current maximum value of the counter.
DefaultcheckboxIf more than one counter can be applied, the one marked as default will be used.

Install

Once you have installed the module normally using module manager, you will see that it adds a new function to the workflow system:

AutoNumberInc(ANPid)

You can now use this function in an Update Field workflow task to assign the next counter value to any field based on any condition in the module.

The ANPid number is the internal CRMID of the record or the value of the Increment field you want to use for the sequence. This number can be found by looking in the URL of the Detail View of the record.

Number formatting

The format field accepts two forms:

1.- Number
A string of numbers that indicate both the number of characters and the actual counter that must appear in the result. This is the same as the default behaviour you can find in the autonumber in Settings. For example, with 000001 you will get the sequence:

000001, 000002,…, 000022, 000023, …000101,…010001…. always with 6 numbers in the counter

2.- Date/Number
An advanced format which accepts any PHP supported date conversion letter and the special string %u for the number.

The string %u accepts the PHP sprintf format. So to obtain the same sequence as in point 1 above you would use:

%'.06u

If you want to put the current year followed by the previous 6 number format you would use:

Y-\%'.06\u

which would produce the sequence:

2015-000001, 2015-000002,…, 2015-000022, 2015-000023, …2015-000101,…2015-010001….

Fields

Auto Number Prefix Information

FieldTypeValues
Auto Number Prefix Noautonumber Identifier
Prefixstring
Modulemodule multi-list
Formatstring
Activecheckbox
Current Valuenumber
Defaultcheckbox
Assigned Toassigned to
Created Timedatetime
Modified Timedatetime

Description

FieldTypeValues
Descriptiontext

coreBOS Documentación