KBA-01126: Overview of the DocNumbering Rules

Overview:

The DocNumbering rules specify options and characteristics for document numbering.

The DocNumbering rule group is found in the Rules Maintenance tool on the System Admin Dashboard. Each rule in the group consists of a rule name, a filter value (which can be blank) and a result value. For additional control over document number format, see KBA-01277.


Filter Values:

Any Doc type

The DocNumbering rules accept a Doc type ( as defined in the Doc Types tool and appearing on the filter drop-down) as the filter value.


Result Values:

Varies

Result values for the DocNumbering rules depend on the rule and are indicated within the description of each rule. Some rules are enabled and disabled through a checkbox in the result value, for example:

checkbox result value


Rules:

CrossProject

Specifies (in the result value checkbox) whether a single sequence of numbers should be used across all projects.
Note: This rule is ignored for Bid and Task documents.

  • unchecked = No (default for most Doc types).
  • checked = Yes (mandatory for Bid and Task documents; default for Catalog File Route, Compliance Notification, Correspondence, Estimate, and Invitation to Bid)

Digits

Specifies (in the result value) the number of digits to be used in the document number, for example 5 (for 10001).  If you are using a mask, see KBA-01277, this value should match the sum of the mask length and you should specify the target auto-sequence segment number below!

OnlyLike

Specifies (in the result value) the SQL LIKE pattern to limit the scope of documents (based on the DocNo format) to which automatic numbering applies. Default is %.   Using this rule overrides numbering with prefix segments (see Segment below)

Segment

Specifies (in the result value) the target segment for the document number. When a segment is specified, all subsequent segments will be zero-filled. When calculating the next number, only strictly numeric prefixes are considered and the largest numeric prefix will prevail and fill prior segments. For example, if a mask defines three segments (n-nnn-nn), the largest number is currently 5-222-33, and Segment = 2, the next document number will be 5-223-00.

  • 0 = use standard numbering.
  • 1 = use the first segment as the target for document numbering.
  • 2 = use the second segment as the target for document numbering.
  • 3 = use the third segment as the target for document numbering.
  • 4 = use the fourth segment as the target for document numbering.
  • 5 = use the fifth segment as the target for document numbering.
  • 6 = use the sixth segment as the target for document numbering.

StartDocNumber

Specifies (in the result value) the first number to be used in numbering documents. Numbering starts with one added to the StartDocNumber, for example, if the result value is 1000, the first document number will be 1001. Note: if documents already exist for the Project/Doc type combination, they provide the starting number so this rule will have no effect. It is also possible to enable masked-based document numbers, but in doing so the automatic number feature becomes somewhat secondary. See KBA-01277.


Additional Comments:

If you need a fully customized approach, ask your implementation specialist about these extensions:

custom.p_GetNewDocNoForType.  This extension allows you to take the “next’ number calculated using the standard algorithm and replace it with a value derived by your own logic.  It works by returning a BIGINT; the rest of the standard formatting applies.  @pDocTypeKey, @pProject, @pSubcontract, @pNewNumber=@NextDocNum OUTPUT.

custom.p_GetFinalNewDocNoForType.  This extension is passed the suggested final DOCNO as VARCHAR(16) and can replace it with something of its own construction.   Passed @pDocTypeKey, @pProject, @pSubcontract, @pNewNumber=@FinalDocNo OUTPUT


KBA-01126; Last updated: August 3, 2020 at 15:29 pm; 
Keywords:  rules;cross project numbering;doc number length; How do I make document numbering start at a specific number or have a set number of digits?