0 Label Merge Field - Phone Number 10 James Temens posted 6 Years Ago We are trying to get the phone numbers of the parents to show up on the check in labels and I wrote the following lava code which works from web page when I add the markup tags and sign in as a child of a parent. However, when I place this into the label merge field and assign it to the label nothing happens. Any ideas?{% assign parents = Person | Parents %} {% for parent in parents %} {% if parent != empty %} {% if parent.PhoneNumbers != empty %} {% assign PhoneMobile = parent | PhoneNumber:'Mobile' | AsString %} {% assign PhoneHome = parent | PhoneNumber:'Home' | AsString %} {% if PhoneMobile != null %} C: {{ PhoneMobile }} {% endif %} {% if PhoneMobile == null and PhoneHome != null %} H: {{ PhoneHome }} {% endif %} {% endif %} {% endif %} {% endfor %}
James Temens 6 years ago It was the Parents lava filter being broken!! Thank you for your time - much appreciated!!
Lee Peterson 6 years ago I mapped it to the "9" field on the stock child icon label, which prints two lines and it works. I wonder if it's because that field prints a field block and your notes field (likely) prints one line? The extra spaces might affect a non-field block line.
Lee Peterson 6 years ago (edited 6 years ago) Yes, I think that's it. I mapped your original code to both the nickname and "9" fields, and it only prints on the "9" field. The modified code I posted works on both fields. The reason it doesn't appear to print is that it's printing all the spaces, and your phone numbers are off the right side of the label.
James Temens 6 years ago Yes, if I put text in the merge field in place of the Lava it does print on the label.
James Temens 6 years ago We are on Rock McKinley 7.3 (1.7.3.54). I will upgrade to the latest version and let you know.