This recipe will show you how to conditionally (per group) suppress the Last Name from printing on a check-in label.


We had a need to suppress the Last Name from printing on check-in labels, but only for specific check-in groups... example: Event Registration check-in where the group type (area) prints the same label for all Event Registration check-ins, but we wanted the labels for a Recovery group to NOT print the last name... or maybe a few Serving Teams that are super-public and only want their first name on the label.

Rather than try to concoct a complex setup with different check-in areas for these special groups (so they could each use a different label that has no last name at all), we tackled the problem in a different way, which allows a single label to be used on the check-in area, yet lets us suppress the Last Name on a per-group basis.


Group Attribute

First, we need to add a new Group Attribute on any Group Type where we have groups that we want to suppress the last name from printing.

  1. Go to Admin | General | Group Types and choose the Group Type you want to add the ability to suppress Last Name to. In this example we're choosing our Class/Event Check-in Group Type.
  2. Add a Group Attribute (NOT Member or Group Type attribute!) and configure it as:
    • Name: Suppress Last Name On Tag?
    • Key: SuppressLastNameOnTag
    • Field Type: Single-Select
    • Values: Yes
    • Control Type: Drop Down List
    It will look like this when done:SuppressLastNameAttribute.png
  3. Save the new attrribute, save the Group Type, then open it back up and modify the security on your new attribute to allow Edit rights to any security roles that need to be able to set or change this attribute on groups of this type.

Label Merge Field

Now we need to add a new Label Merge Field to deal with our new attribute.

  1. Go to Admin | Check-In | Label Merge Fields and click + to add a new merge field.
  2. Configure it like this:
    • Value: LastNameWithSuppress
    • Description: Suppresses printing of Last Name for groups with the 'Suppress Printing of Last Name on Tag?' attribute set to Yes, otherwise prints the Last Name.
    • Mergefield:
      {%- for group in GroupType.Groups -%}{%- for location in group.Locations -%}{%- assign suppress = group.Id | GroupById | Attribute:'SuppressLastNameOnTag' -%}{%- endfor -%}{%- endfor -%}{%- if suppress != 'Yes' -%}{{ Person.LastName }}{%- endif -%}
    • Save the Merge Field

Edit Labels

Now we need to modify the label(s) that will use this new "suppress last name" functionality.

  1. Go to Admin | Check-In | Check-In Labels and open the label you want to modify.
  2. Change the existing Last Name Merge Code to be your new LastNameWithSuppress merge field instead, like this SuppressLastNameAttribute.png
  3. Save the Label

Modify Groups

Finally, we need to go to any check-in groups that need the Last Name suppressed on the label, and set the Suppress Last Name on Tag? group attribute to Yes.

  1. Go to a group you want to modify
  2. Edit the Group
  3. Click Group Attrbute Values and set Supress Last Name on Tag to Yes (Note: If you don't SEE the Suppress Name attribute, that means you didn't add said attribute to the group type you're looking at.. see the Group Attribute section above. It could also mean you don't have rights to view the group attribute.)
  4. Save the Group

Test it!

Now you're ready to try out a check-in on a group you just modified and set the Suppress Printing of Last Name on Tag? attribute to Yes. If you did everything right, the last name will be gone when you check in to that group.

The astute may wonder why we made a new LastNameWithSuppress Label Merge Field at all, and didn't just replace the existing Last Name merge field with our new Lava? That would certainly work, but it's likely that you have MANY more groups that DO need the last name printed (think of all your Kids, Youth, and perhaps Small Group groups that print the Last Name on the label. These group types will never even have the Suppress Last Name on Tag? Group Attribute defined (since they don't need it) and it seems wrong/inefficient to have the extra Lava that evaluates this non-existent attribute on every check-in that happens on them... that's why we added a new Label Merge Field and only change to that on the specific label types that will ever use it.