Search code examples
zebra-printerszpl-ii

Using Multiple Variables to Create a Single Data Matrix in ZPL


I am trying to set up a label template for a Zebra printer that has 4 variables containing different pieces of information, FN1, FN2, FN3, and FN4. These 4 variables are printed to text and barcode fields on the label, however I also want to concatenate them together to create a single data matrix containing the data in all 4 variables.

I have tried inserting line breaks using \& as suggested on page 144 of the documentation but this does not seem to have any effect. The code for the field data I'm trying to use is shown below.

^FH\^FN1\&^FN2\&^FN3\&^FN4^FS

Only the content of the last variable in the list (FN4, in that case) is encoded into the data matrix, the rest are ignored. I suspect I'm missing something fairly straightforward, but have not been able to find any articles relating to this exact problem.


Solution

  • For anyone else looking for this kind of solution, I have received confirmation from Zebra that this is unfortunately not currently (as at 01/02/2023) possible in ZPL. You should be able to implement it with ZBI, but this is quite a different approach and requires compatible hardware.