Batch Group
A batch group: the parts a batch number is built from, in order.
What it is for
When an item's tracking structure has Batch Number (Automatic), the system builds its batch numbers from the lines of the item's batch group, in line order, joining the parts:
- CV (constant): the Constant Value, as typed.
- DV (data value): the value of a field of the document named in Field Id, or the result of the SQL.
- SR (serial): a running counter, padded with zeros to as many digits as End Value has. The counter runs separately for each value of its Field Id, when one is given.
The rules are checked on Save: SR needs an End Value and no constant; CV needs a constant and no End Value; DV needs a Field Id or an SQL and no End Value.
Every field in plain words
Header
| Field | What it means | What to put |
|---|---|---|
| Batch Group | The short code. | Cannot be changed once saved. Required |
| Name | The name shown in lookups and on documents. | A clear name. Required |
Lines
One line per part of the number, in order.
| Field | What it means | What to put |
|---|---|---|
| Rule | The kind of part. | CV, DV or SR |
| Field Id | A field of the document whose value is used. | For DV, or to split an SR counter |
| Constant Value | Fixed text. | For CV only |
| End Value | Its number of digits sets the counter width. | For SR, for example 9999 for four digits |
| SQL | A query that returns the part. | For DV, by the consultant |
How to configure it
There is nothing to configure beyond the fields above. Which fields are shown, required or hidden can be changed per company by the consultant in the screen configuration.
Scenarios
- A food plant numbers batches as plant code plus a four-digit counter. Line 1 CV with the plant code, line 2 SR with End Value 9999.
What it is connected to
- Tracking Structure - switches automatic numbering on
- Release Item In Legal Entity - Batch Group on the item
- Manufacturing Order - a released process order gets its batch number this way
If something looks wrong
- "Batch group Lines cannot be empty" Add at least one line.
- "Batch group - Line ID... Rule is mandatory" Pick a rule on each line.
- "... End Value is mandatory" / "... Constant value is not allowed" / "... ConstantValue is mandatory" / "... EndValue is not allowed" / "... FieldID or SQL is mandatory" Fill each line as its rule requires (see above).