# Zebra printing - Syntax for inserting variables and/or table records into ZPL code

**URL:** <https://community.tulip.co/t/zebra-printing-syntax-for-inserting-variables-and-or-table-records-into-zpl-code/7582>\
**Category:** Support, Troubleshooting, & Help\
**Tags:** zpl, zebra\
**Created:** [February 16, 2023, 6:43pm UTC](https://community.tulip.co/t/zebra-printing-syntax-for-inserting-variables-and-or-table-records-into-zpl-code/7582 "2023-02-16T18:43:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![k.ober](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/k.ober/32/6330_2.png) [@k.ober](https://community.tulip.co/u/k.ober)\
**Post date:** [February 16, 2023, 8:38pm UTC](https://community.tulip.co/t/zebra-printing-syntax-for-inserting-variables-and-or-table-records-into-zpl-code/7582/2 "2023-02-16T20:38:13Z")

</div>

Hey @nelsonj !

Thanks for the detail here. Happy to help. Moving through my debugging steps:

The Zebra Printer Driver catches errors, but Zebra Printers do not. Is your Trigger throwing an error of some kind? Is this error shown in an in-app Message (“Error executing Trigger”)?

From what I can see with your previous print, it would look like you can successfully connect to the printer, and therefore should be instead getting an **Error Executing Trigger**.

This error means that Tulip is having trouble parsing your Expression into text. To test this easily, copy that Expression, make a button, and paste the Expression in a “Show Message” trigger on that button. Now, we just have to fix this expression until hammering that button shows the Z-code we want.

The four things I would check here:

1. The Expression has all its quotes and +'s in order - this looks to be true, because it says “Valid Expression” on the bottom in green.
2. All the Variables in the expression have a value - if you give an Expression _anything_ that includes a null or empty variable, the _entire_ Expression will become null. Be sure your input Variables actually have something in them at the time that this trigger is running - for example, by using the Debug view.
3. The DATETIMETOTEXT function you have there is parsing correctly - it looks like it, but again if that becomes null then the entire Expression is null. Test this by pasting that function over in a different Message.
4. If all else fails, it’s because everything here needs to be of type **Text** (i.e. a String), and some of these variables are other types (e.g. **Number** , **Datetime** , or etc.). I don’t _think_ this is the case, as I _think_ the + already forces everything to be a string, but I may be wrong here.

Let me know if this helps!

---

_[View the full topic](https://community.tulip.co/t/zebra-printing-syntax-for-inserting-variables-and-or-table-records-into-zpl-code/7582)._
