Handler - IDGenerator
IDGenerator handler generates an ID for the attribute automatically.
For this handler to function as intended, parent attribute should be set unique.
The following tables provide information on the attribute settings and metadata requirements for IDGenerator handler.
Table 1. Attribute Settings
| Handler name | Datatype |
|---|---|
IDGenerator |
String or Number |
This handler doesn't require any mandatory metadata configuration.
Table 2. Optional Attribute Metadata
| Name | Value | Description |
|---|---|---|
Digits |
Integer |
Minimum number of digits. The generated ID is zero padded, if needed. Notice that the number you defined specifies the minimum number of digits an ID consist of, yet the minimum does not limit the maximum. For example, if the value is 4, the first ID is 0001 and the series continues normally after 9999 although next number consists of 5 digits. |
template_code |
prefix |
In the In the For example, if you give a If you set template code as folder metadata, Notice that if the attribute data type is number, you cannot use the prefixes! |
Replace value with ID |
String |
If the value of the You may want to use the |
Separate template ID series |
|
Denoted templates' ID series are separated according to the given prefixes. Notice that in order to enable the feature, you must define each template whose ID series you want to separate by their individual template code and by a prefix. Separate template ID series metadata enables giving the same ID number with different prefixes to several templates; for example, (For backward compatibility, value |
Table 3. Automatically Created Attribute Metadata
| Name | Description |
|---|---|
currentID |
Metadata will be generated and activated automatically after the first data card including the handler is created. Thus do not insert it manually. It is also recommended not to change the generated value. |
currentID_ template_code |
Metadata will be generated and activated automatically if the Thus do not insert it manually. It is also recommended not to change the generated value. |
The following metadata settings are obsolete:
- Generate automatically (
generateAutomatically) is always true. - Generate when saving (
generateWhenSaving) is always true. - Use generate button (
hasGenerateButton) is always false. - Unchangeable (
unchangeable) is always false. - Override prefix from attribute is no longer supported.
Table of Contents