Skip to end of metadata
Go to start of metadata

Description

User label output with increment field is returning unexpected values in the index sequence. For example, target field indexes from the value '9' to '0' instead of the expected '10' value.

Details

User has a label that contains a data field that has it’s data source set to  Incr/Decr - Increment.

Explanation

In the above image, the increment field has a clear value of ‘1’. When printed, the output of this field on the resulting labels will show the value ‘9’, ‘0’, ‘1’, ‘2’, '3', '4' in succession as the labels produced count over the value of '9'. This can be dealt with by changing the clear value to something like '001' to take into account a three digit output, but might not be suitable when used with drop files, as these values come from other systems and the input data would have to be modified with leading zeros to cover the expected input value width. The solution to this scenario is best handled at the label design level.

Solution

There are three steps a user can take to control the displayed Inc/Dec values and how they are displayed on their label.

Step 1:

The properties for the Inc/Dec field need to support the expected width of the values that will be displayed. Set the max number of characters to at least the expected highest value width. If the user does not want to see the leading zeros in their output, they can optionally make this field non-printing and move to step two. Otherwise, they are done.

  1. Open the Designer application and select the target label.
  2. Right-click on the Inc/Dec field and select Edit Field.
  3. Set the Padding property to 'Leading zeros'.
  4. From the Properties view, click on the ellipsis button on the Data Source field.
  5. In the Inc/Dec Definition, verify all the existing settings for the field.
  6. Save your work.

     

Step 2:

The next step is to create a substitute printing field on the label in the expected output position and format it accordingly.

  1. Right-click on the field that will display the formatted value and select Edit Field.
  2. From the Properties view, click on the ellipsis button on the Data Source field.
  3. Set this property to Formula.
  4. In the Formula Definition, select the ltrim operation and complete the formula to strip out leading '0's from your Inc/Dec field (see sample below).
  5. Save your work.

     

Step 3:

If you wish to right justify the formatted display of the Inc/Dec value:

  1. Right-click on the field that will display the formatted value and select Edit Field.
  2. From the Properties view, click on the Padding field.
  3. Set this property to Leading Spaces.
  4. Save your work.

Article Number

2016029

Versions

All supported LPS family product versions.

Environment

All supported environments.