<div dir="ltr"><div>We do it using ternary logic: <br></div><div><br></div><div>{{patron.pref_first_given_name ? patron.pref_first_given_name : patron.first_given_name}}</div><div><br></div><div>If preferred first name exists, then use preferred first name - otherwise use first given name.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 20, 2024 at 3:28 PM Chauncey Montgomery via Evergreen-general <<a href="mailto:evergreen-general@list.evergreen-ils.org">evergreen-general@list.evergreen-ils.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">We are trying to create a conditional statement within the receipt templates that will display a user's preferred name, if that condition is true; otherwise, the given name will be displayed on the receipt.<br>
<br>
How would I go about creating a conditional statement that checks if there is a value in the patron.pref_first_given_name field?<br>
<br>
Many thanks.<br>
CM<br>
--<br>
Chauncey Montgomery<br>
Community Library<br>
44 Burrer Dr | Sunbury, OH 43074<br>
740-965-3901 | <a href="https://www.yourcl.org" rel="noreferrer" target="_blank">https://www.yourcl.org</a><br>
_______________________________________________<br>
Evergreen-general mailing list<br>
<a href="mailto:Evergreen-general@list.evergreen-ils.org" target="_blank">Evergreen-general@list.evergreen-ils.org</a><br>
<a href="http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general" rel="noreferrer" target="_blank">http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general</a><br>
</blockquote></div>