web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

Document Routing Labels, ZPL, and field substitution

(1) ShareShare
ReportReport
Posted on by 2
I'm maintaining some Label in Document Routing that a previous developer coded, and I see that they used $itemfieldname$ coding to insert a value from a table during real time printing of labels.
 
Is there any documentation on how this substitution functionality works? Specifically, are they any parameters to this function? For example, are the parameters that allow me to specify which part of the value I wish to print? If, for example, the field/variable was an item number and you only wanted to print the first three characters, could you do something line $itemfieldname$:1-3?
 
Any light that can be shared on this function would be greatly appreciated.
 
Scott Lineberger
Coastal Industries, Inc.
 
I have the same question (0)
  • Laurens vd Tang Profile Picture
    4,012 Super User 2025 Season 2 on at
    Good day Scott,
     
    Which layout do you use? There are few options:
     
    • Document routing layout
    • Label layout
    • Wave label layout
    I believe it is not possible print only the first three or two characters of a value.
     
    Best regards,
    Laurens van der Tang
  • Suggested answer
    Danny Bilodeau Profile Picture
    4,918 Super User 2025 Season 2 on at
    Hi SL,
    Here is an old post that explains the mechanics of it all: https://kashperuk.blogspot.com/2016/10/tutorial-extending-label-printing.html
     
    Back then the table used to generate Labels was the WHSLicensePlateTable so you will see several mention of that table. Now, with customs labels you can use pretty much any table as the source of the data.  The principles would have remained the same, just replace your table's name as the source of your License Plate / Container / Customs label and you can understand the general mechanics.
     
    The %fieldname% is simply a placeholder (or variable) that you insert in the zpl code and that is being replaced by the real value at the time of label printing. That variable can't just be anything, it must be an available field from the table you are using.    
     
    On the question of the existence of a parameter to truncate a string value, there is no such parameter and there is no zpl instruction that will do so.  For this to occur will require pre-processing before the coded label is sent to the label printer; a developer would be able to assess the feasibility and effort required for that pre-processing.  
  • Uzair Siddiqui Profile Picture
    32 on at
    Simple solution would be to created a method to populate the with the limited characters and then replace the ZPL placeholder.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 301 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 118 Super User 2025 Season 2

#3
Siv Sagar Profile Picture

Siv Sagar 105 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans