Product: Mapping Manager
Article Link: http://help.truecommerce.com/en/articles/11180465-mapping-manager-automatic-line-number-sequencing
You can utilize the Item Loop Index token to automatically introduce an incremental Line Number counter to your Line Numbers that will begin its count from 1 and increment by +1 for each new Line Number.
Mapping the Item Loop Index
Simply drag the Item Loop Index token found under Tools β AccountInfo onto your Line Number to initiate a sequential looping to that field.
Navigate: Partner Maps β (Map)
Select: Edit
Navigate: Tools β AccountInfo
Map: Item Loop Index
Your token should appear as [I:Item Loop Index] - the I: prefix is for AccountInfo Tokens
Formatting the Line Number Sequence
If you would like to format the Line Number Sequence you can do so in a few ways utilizing a handful of functions within Mapping Manager.
Consistent Length
If you'd like to have your Line Numbers follow a format requiring a consistent length (for example 3-digits minimum) you can utilize the @INT() function to pad zeroes in front of the sequence turning your 1, 2, 3 into 001, 002, and 003
Map: @INT([I:Item Loop Index],0,3)
Replace the 3 with the desired length
Function: @INT()
Parameter 1: Item Loop Index Token to Format
Parameter 2: Shift (Allows your sequenced number to shift left)
Parameter 3: Length - Minimal length expected (padded with 0s to comply)
Package Looping Resetting
If you're attempting to use the Item Loop Index on an Advance Ship Notice (856) or Warehouse Shipping Advice (945) where you have multiple Items nested within a single Package - then the Sequence will reset for each package. Resulting in Line #s returning back to 1 for each new Package.
The [I:Item Loop Index] will only increment with Line Numbers - adding this to Packs or Pallets will still attempt to drive against the Line Loop will provide inconsistent results
rev 5/1/2025