With the components of this article, without any finagling, you'll be able to include a star that shows up on a person's first check-in to your organization on the top right corner of a 3x2 label.  You can change the conditions in the Lava to change when/if you want the image to show, and you can change what kind of image you want shown!  The value you get out of this is only limited by your organization's needs.

The Dilema

Including an image on a child's tag can add a nice personal touch to a visitors experience at your church.  However it's pretty difficult to deploy these images to printers.  Especially with traditional methods, if you want an image shown conditionally, it'd need to be in a font file.  But I found a way around that :)

The Solution In Brief

Since Rock resolves the merge fields for names, security codes, etc. by resolving the Merge Field Lava and then replacing the text in the code of the label with the results of the Lava, you can perform a kind of "ZPL Injection" to include your image in the label.  The Merge Field that is going to replace the "Text" on the label will be the end of a merge field, the full content of the image, then the beginning of a merge field.  So when this content it dropped inside of an existing merge field, it ends the original merge field, includes the image field, then begins the merge field that is promptly ended after your lava content ends..  This trickery allows you to include an entire element to the label.  And, although I wouldn't recommend it, hypothetically, you could include an entire label this way...  The possibilities are endless.

But don't focus on all of that.  Meet a need then think of all of the cool ideas

The Components

There's two components to this trick.  One is a "donor" merge field, and the other is the image.


This is a placeholder that will be "replaced" by the image.  The size and position of the text really shouldn't matter since will effectively be replaced with a blank space.

^FO400,32^A0,20,20^FDStarPlaceholder^FS


This is what you want to configure as a Merge Field, and then configure your check-in label to use in the stead of "StarPlaceholder"

{% if Person.FirstTime == true %}^FS
^FO475,25^GFA,1358,1358,14,S0F8,R01FC,R03FE,R07FF,:R0IF8,:Q01IFC,:Q03IFE,:Q07JF,:Q0KF8,:P01KFC,:P03KFE,:P07LF,:P0MF8,:O01MFC,:O03MFE,:O07NF,O0OF8,M03QFE,K01UFC,J0YF8,007gHF,01gIFC,07gJF,:0gKF8,::::07gJF,:03gIFE,01gIFC,00gIF8,007gHF,003gGFE,I0gGF8,I07gF,I03YFE,I01YFC,J0YF8,J07XF,J03WFE,J01WFC,K0WF8,K07VF,K03UFE,K01UFC,L0UF8,L07TF,L03SFE,:L07TF,:::::L0UF8,::::K01UFC,:::::K03UFE,:K03MFDMFE,K03MF07LFE,K03LFC01LFE,K03LFI07KFE,K07KFEI03LF,K07KF8J0LF,K07JFEK03KF,K07JF8L0KF,K07IFEM03JF,K07IF8N0JF,K07FFEO03IF,K03FF8P0FFE,K01FEQ03FC,L0F8R0F8,^FS
^FO400,32^A0,20,20^FD{% else %} {% endif %}

The actual star image (on the middle line of the above block) can be replaced with any ZPL image.  You can get these images by creating a label using the Zebra Designer (or Labelary) the way you'd normally create a label.

img_20181015_134057-2.jpg

You can find me in the Slack community as @chrisrea .  If you have any questions or issues with this recipe, please let me know!