Resetting Numbers and Hiding Parts in a Sequence Format
When building sequence formats, you can optionally specify that a field placeholder part resets a sequence number. You can also specify that the part is hidden from the generated sequence number.
Resetting Numbers
You can specify that the sequence number resets to the starting value whenever the value in the associated field changes. For example, you can specify that Foundations resets the sequence number for each record that contains a different company code or document type prefix.
Example
A sequence format contains the following information:
- Two field placeholder parts, text parts that contain hyphens, and one number sequence part (Placeholder-Placeholder-00001)
- The starting value is 00001
- The placeholder parts relate to company name and company code
- Reset Sequence Number is selected on each placeholder part in the sequence format
When you generate sequence numbers, the number resets to the starting value for each different company name or company code, as displayed in the Generated Sequence Number column.
Record ID |
Company Name |
Company Code |
Generated Sequence Number |
---|---|---|---|
1 | Merlin | US | Merlin-US-00001 |
2 | Acme | US | Acme-US-00001 |
3 | Merlin | UK | Merlin-UK-00001 |
4 | Acme | UK | Acme-UK-00001 |
Hiding Parts from a Generated Sequence Number
You can create sequence formats that reset the generated sequence number without displaying the part that resets the number. You can hide any field placeholder parts that reset the sequence number.
Example
A sequence format contains the following information:
- One visible field placeholder part, one hidden field placeholder part, a text part that contains a hyphen, and one number sequence part (PlaceholderPlaceholder-00001)
- The starting value is 00001
- The placeholder parts relate to company name and a date field that displays the current year
- Reset Sequence Number is selected on each placeholder part in the sequence format
- As the date placeholder is hidden, the generated sequence contains only the first field placeholder, the text, and the number sequence parts (Placeholder-00001)
When you generate sequence numbers, the number resets to the starting value for each different company name or year. The table displays the different sequence numbers that can be generated, depending on whether the date part is visible or hidden.
Record ID |
Generated Sequence Number |
Generated Sequence Number |
---|---|---|
1 | Merlin2016-00001 | Merlin-00001 |
2 | Merlin2016-00002 | Merlin-00002 |
3 | Merlin2017-00001 | Merlin-00001 |
4 | Merlin2016-00003 | Merlin-00003 |
5 | Merlin2017-00002 | Merlin-00002 |
6 | Merlin2017-00003 | Merlin-00003 |
7 | Merlin2018-00001 | Merlin-00001 |
8 | Acme2016-00001 | Acme-00001 |