Syntax Description
| Parameter |
Status |
Type or Possible Values |
Applicable Modes |
Description |
name |
Mandatory |
String |
All |
The unique identifier of the custom revision sequence.
|
title |
Optional |
String |
All |
The title of the custom revision sequence, displayed in
the list of available revision sequences in the
Predefined Sequences tab or when
applying them to object types. |
description |
Optional |
String |
All |
The description of the custom revision sequence. You
can use it to document the specifications of the custom
revision sequence, for example. |
mode |
Mandatory |
alphabet |
- |
The custom revision sequence is defined by a series of
character ranges. Ranges must be in the alphabetical order
(for example, A-C. C-A is
incorrect). |
sequence |
- |
The custom revision sequence is defined by a finite list
of elements. The order is free (for example, ["C",
"B", "A"] is possible). |
digit |
- |
The custom revision sequence is defined by a linear
number sequence only. By default, the sequence starts with
1. You can specify another number with the
startfrom property. |
alphabet |
Optional |
Array |
alphabet |
Defines the list of authorized characters. |
startfrom |
Optional |
Number |
digit |
Defines the first numerical value after the
init sequence. |
init |
Optional |
Array |
All |
Defines a sequence list for the first revisions (for
example, ["-", "--", "---"] for the first
three revisions).
Values defined in prefix and
padding do not apply to these
values. |
prefix |
Optional |
String |
alphabetdigit
|
Defines a prefix to apply to all revision numbers, except
the ones defined in init. |
maxsize |
Optional |
Number |
alphabetdigit
|
The maximum number of characters allowed for revision
names. This number includes the prefix, if you specified
one. When the maximum size is reached, users cannot
revise the object anymore. |
padding |
Optional |
Object |
All |
Completes the revision number with a character to match a
specific size (excluding the prefix), either on the left or on
the right. |
char |
Mandatory with the padding
property |
Character |
All |
The character used to complete the revision number up to
the size specified in tosize. |
tosize |
Mandatory with the padding
property |
Number |
All |
Specifies the required number of characters of the
revision number for the padding. This number does not
include the prefix. |
direction |
Mandatory with the padding
property |
[right | left] |
All |
Defines if the padding characters are added on the right
or on the left of the revision number. |
Examples
The following JSON file declares five different custom revision
sequences: [
{
"name": "AlphabetInit",
"title": "A to H with dash init",
"mode": "alphabet",
"alphabet": "[A-H]",
"init": ["-", "--", "---"]
},
{
"name": "AlphabetPadding",
"title": "Alphabet with padding",
"mode": "alphabet",
"alphabet": "[A-H,J-N,P,R,T-W,Y]",
"padding": { "char": "-", "direction": "left", "tosize": 3 }
},
{
"name": "Digit_Max",
"title": "Digits from 1 to 9",
"mode": "digit",
"maxsize": 1
},
{
"name": "Digit_Prefix_Padding",
"title": "Digits with equal sign”,
"mode": "digit",
"prefix": "=",
"padding": {
"char": "0",
"direction": "left",
"tosize": 3
}
},
{
"name": "SequenceInit",
"title": "Finite sequence",
"mode": "sequence",
"init": ["-", "--", "---", "seq" , "A" , "B" , "1" , "2" , "DS" , "avion"]
},
{
"name": "ER097695",
"title": "Double Digits",
"mode": "digit",
"startfrom": 0,
"padding": {
"char": "0",
"direction": "left",
"tosize": 2
}
}
]
In this file, the five examples define the following revision sequences:
-
{
"name": "AlphabetInit",
"title": "A to H with dash init",
"mode": "alphabet",
"alphabet": "[A-H]",
"init": ["-", "--", "---"]
}
Custom revision sequence: -, --, ---, A, B, C, D, E, F, G, H, AA,
AB, AC, AD, AE, AF, AG, AH, BA, BB, BC, BD, BE, BF, BG, BH, CA, …,
HF, HG, HH, AAA,AAB,AAC,AAH,AHA,AHB,...,HHH,AAAA,AAAB, ...
-
{
"name": "AlphabetPadding",
"title": "Alphabet with padding",
"mode": "alphabet",
"alphabet": "[A-H,J-N,P,R,T-W,Y]",
"padding": { "char": "-", "direction": "left", "tosize": 3 }
},
Custom revision sequence: --A, --B, --C, --D, --E, --F, --G, --H,
--J, --K, --L, --M, --N, --P, --R, --T, --U, --V, --W, --Y, -AA,
-AB, -AC, -AD, -AE, -AF, -AG, -AH, -AJ, -AK, -AL, -AM, -AN, -AP,
-AR, -AT, -AU, -AV, -AW, -AY, -BA, -BB, -BC, -BD, -BE, -BF, -BG,
-BH, -BJ, -BK, …
-
{
"name": "Digit_Max",
"title": "Digits from 1 to 9",
"mode": "digit",
"maxsize": 1
},
Custom revision sequence: 1, 2, 3, 4, 5, 6, 7, 8, 9
-
{
"name": "Digit_Prefix_Padding",
"title": "Digits with equal sign”,
"mode": "digit",
"prefix": "=",
"padding": {
"char": "0",
"direction": "left",
"tosize": 3
}
Custom revision sequence: =001, =002, =003, =004, =005, =006,
=007, =008, =009, =010, =011, =012, =013, =014, =015, =016, =017,
=018, =019, =020,…, =099, 100, 101, …
-
{
"name": "SequenceInit",
"title": "Finite sequence",
"mode": "sequence",
"init": ["-", "--", "---", "seq" , "A" , "B" , "1" , "2" , "company" , "plane"]
}
Custom revision sequence: -,--,---,seq,A,B,1,2,company,plane
-
{
"name": "ER097695",
"title": "Double Digits",
"mode": "digit",
"startfrom": 0,
"padding": {
"char": "0",
"direction": "left",
"tosize": 2
}
}
Custom revision sequence: 00, 01, 02, …, 09, 10, 11, …, 99, 100,
101, …
|