Do you want to print on your children's name tags the parent names and phone numbers based on who checked the child in but not necessarily the actual parent of the child? ie: Grandma and Grandpa have a (Can Checkin) Relationship and use their phone number to check the child in, and then you need to contact them during the service, but you end up texting mom and dad who are on vacation and have to give you Grandma and grandpa's cell phone number?

Create a Lava Short Code by going to Admin Tools > CMS Configuration > Lava Shortcodes and hitting the + Button.  Name it whatever makes sense to you.  I did `GroupById` and used that same title for the shortcode itself.  Choose "Inline" and give it a description.  This shortcode will give the Group Id of the group that was used to check the child into.  This allows you to find out the "Adult" role in that group to get the phone numbers and names from it.  Type the following into the Shortcode markup box:


select TOP 1 SearchResultGroupId from attendance where personaliasid='{{paid}}' order by startdatetime desc {% endsql %}
{% for r in results %}{{r.SearchResultGroupId}}{% endfor %}

Create a new parameter called "paid" and leave the value blank

Enable SQL on the shortcode and hit save.


Now create a new merge label in Admin Tools > Check-in > Label Merge Fields and click the + button.

Name it what makes sense to you.  "Parent Information based on Family used to checkin" is what i used.

Copy and paste this into the merge field:

{% assign attendance = Person.Id | PersonById | Property:'PrimaryAliasId' %}
{% capture rsg %}{[GroupById paid:'{{attendance}}']}{% endcapture %}
{% assign familyid = rsg | GroupById %}{% assign fid = familyid.Members %}{% for gm in fid %}
  {% assign grid = gm.GroupRoleId %}
  {% if grid == 3 %}
  {{gm.Person.FullName}}:{{gm.Person | PhoneNumber:'Mobile' }}\&
  {% endif %}
{% endfor %}

This assumes your are using the default 'Adult' role in the default 'Family' grouptype.  If that is not true you will need to adjust the {% if grid == 3 %} to line up with whatever role your adult role is in your family grouptype.

You might have to do some finagling on the label itself to make it fit your desired dimensions and style.  I have the `\&` causing a line break in there so that each parent is on a separate line.

Your ZPL may need some tweaking to do multiple lines. Reach out in the #Check-in channel in RocketChat if you are having trouble with your Label printing weird characters or not printing on mulitple lines. Some things to check though are:

  • "^FH\"" tells the printer that any character following a \ is hex. You never need them.
  • To print multiple lines you need a field block. After the FT part add ^FBwidth,number of lines,space between lines,justification. Something like ^FB600,2,0,L should be close.