Most of the data handled in CARL Source is identified by a unique code.
You can set the settings of CARL Source so that this code is filled in automatically when the element is created.
Automatic coding consists in defining the code format that will be offered as default in the entity creation forms.
The consists of a concatenation of the following elements:
- An optional alphanumeric prefix,
- A mandatory numeric sequence, possibly completed with leading "zeros,"
- An optional alphanumeric suffix.
- It is not mandatory to define automatic coding for an entity.
- Even if a code is pre-recorded by automatic coding upon creation of an entity, the code can be modified.
Managing the list of entities having a default code
- Place the cursor in the [System] module and select [Automatic coding] from the "Configuration" section.
→ The list of entities having an automatic code is displayed.
- To define an automatic code for an entity that is not on the list, click on the add icon
.
→ A line is added.
- Then select the entity for which the code is defined.
Field details
- Entity: Identifier of the entity concerned by the assignment of an automatic code by default.
- Prefix: First characters of the automatic code.
- Sequence: Current value of the whole number forming the numerical portion of the automatic code, which will be incremented upon each creation and will thus ensure that the code is unique. In general, the sequence has a value of 0 or 1 upon creation.
- Sequence length: Number of characters in the sequence (the figure is completed with zeros to the left to arrive at the required length). If the length is 0, the length of the sequence is the number of figures in the whole number.
- Suffix: Last characters of the code.
-
Expr. interpreted? : Enables or disables interpretation of expressions in Prefix and Suffix attributes, thereby making the code dynamic. The following expressions are available:
- {yyyy} → Year as 4 digits
- {yy} → Year as 2 digits
- {MM} → Month
- {ww} → Week number
- {dd} → Day
- {HH} → Hour
- {mm} → Minute
- {ss} → Second
Be sure to use the correct case when typing to ensure correct interpretation.
Examples
Example 1:
prefix = WO-
sequence = 7
sequence length = 4
suffix = -2007
→ Next code = WO-0008-2007
Example 2:
prefix = <not filled in>
sequence = 145
sequence length = 0
suffix = <not filled in>
→ Next code = 146
Example 3:
prefix = CMDE-{MM}/{yyyy}-
sequence = 8
sequence length = 3
suffix = <not filled in>
Expr. interpreted? = <Activated>
→ Next code = CMDE-05/2025-009
configure date-based expressions
From the list of automatic codings, via
, you can configure date-based expressions in the "Prefix" or "Suffix" fields.
The action is available if you have automatic coding editing rights, and becomes accessible only when at least one line is selected.