ZPL with variable substitution from table record

We are using a Tulip app to print labels for production orders. Initially since we only had one label type we just plugged in the ZPL code directly in the trigger.

Now we would like to have multiple label sizes and trying to manage that within the trigger is cumbersome. We tried putting the ZPL code in a table record and it does work/print, but the variables are no longer substituted.

Is there a way to make this work?

Hello Richard

I can share a few lessons learned from our ZPL experience with Tulip triggers:

  • I keep 1 ZPL code and to adjust the printing to the different size of label, I will add ^LS{number positive or negative} at the beginning of the zpl code Adjusting Left Position and Top Position on Zebra Barcode Printers
  • All variables need to be text, so timestamp for example should be converted
  • ZPL code doesn’t like null variables (it can stop the printing)

An example below:
I hope some of this feedback can help :slight_smile:

In our case I had to “collapse” all the text, a pure Y offset adjustment wouldn’t work. We ended up adding a column to our lookup table which associates stations with the correct printer IP address for label stock (4x3 or 4x2) and then just added an if condition to the print label trigger.