Doctype Auto ID Pattern

Specifies the pattern for auto increments for a given doctype.

Tags
name-pattern
Identifier
projectdoc.doctype.(doctype).auto-id-pattern
Data Type
JSON, string
Default Value
{}
Since
2.6

This space property specifies a pattern to apply to generate identifiers for a given doctype. There can be at most one pattern per document type.

The property is part of the Auto Increment feature.

Increment Specification

The Increment Specification defines which number format should be applied to which document instance. For each doctype there may be one specification and in each of these specifications there may be specifications that take the doctype of the parent into account.

{
  "specs": [
      {
          "parentDoctypes": [],
          "parentProperty": "",
          "function": {
              "format": "",
              "increment": 1
          }
      }
  ]
}
NameDescription
specsList of doctypes increment specifications.
parentDoctypes

Comma-separated list of doctype IDs to specify for which parent document types the increment format should apply. If omitted, the format is applied to any parent doctype. Doctypes increment specifications without a doctype must be specified at the end of the list.

parentProperty

The name of the parent property to use as the prefix for the ID. This value is only used if the new document has no siblings.

functionThe increment function to create the new ID.
formatThe format specifies the number of digits of the number block.
increment

The increment for each new ID. The value must be an integer greater than zero.

To test a configuration there is a REST service at projectdoc-internal/1/increment/test that is available to logged in users.

Example of Usage

The specification is done in JSON format.

Resources

Default Group Name Pattern
Specifies for the name pattern the default group to select.
Doctype Document Name Pattern
Specifies a doctype-specific pattern to match against the title property to derive the name property of a projectdoc document.
Doctype Document Name Pattern
Specifies a pattern to match against the title property to derive the name property of a projectdoc document.
Doctype Document Name Pattern Group
Specifies for the name pattern the doctype-specific group to select.
Auto Increment
A feature of the projectdoc Toolbox to prepend a unique identifier to the title of a page.
Nameless Documents
Feature to derive a document's name from its title.
Doctypes Overview
List of all doctypes provided by add-ons. Provides an overview over doctype IDs and blueprint keys.