Incrementing Field Starts Over At Nine
Description
Incrementing fields on my label do not increment past 9. Once the number reaches 9, it starts over again at 0, how do I fix this?
Solution
The maximum number of digits that an incrementing number displays is dependent upon the number of digits in its starting value. For example, if the starting value is 1, the highest number that the incrementing field reaches, before wrapping back to 0, is 9. If the starting value is 001, the number reaches a maximum value of 999 before wrapping back to 0.
Note: In the latter example, the number 1 displays as 001, the number 50 displays as 050, etc.
The following method can be used to remove the leading zeros from an incrementing number. The Max # Chars property values used in the example below may be modified to meet your needs.
- Open the label in question in Loftware Design Mode and place two variable text fields on it.
- Set the Max # Chars for both fields to 3, set the Printing Field property for one of the fields to No and set the Padding property for that same field to Leading Zeros.
- Give each field a meaningful Name; for example, call the non-printing field Field A and the printing field Field B.
- Double-click on Field A. Data Source
Where data is extracted to produce labels. Loftware Label Manager provides a variety of data sources, including the keyboard, a database, serial number, a formula, via the UCC or UPN Wizard. For RFID labels and tags, data can come from the Keyboard data source or by configuring data blocks using the Block Configuration data source. Configuration is displayed. In the left-hand column, select Incr/Decr as the data source and accept the default settings. Click OK.
- Double-click Field B and select Formula as the data source. Set the formula as follows:
LTrim('0',Field A) - Click OK; save the label.
-
Open the label in On-Demand Print, add starting values, print a quantity greater than nine to verify the correct behavior.
Article Number
2009113
Versions
All versions of Loftware
Environment
All supported installation environments.