Hi Kevin,
Thank you for your reply!
I received an answer in the other thread opened here: https://community.hubspot.com/t5/Email-Marketing-Tool/HubL-using-custom-contact-properties-in-if-statements-in-an/m-p/315403#M3809 (again sorry for the duplicate, if an admin can merge these two threads would be perfect).
I understand string comparison is case sensitive and that’s what I expected too.
I tried your code like this:
{% set n_a = 'N/A' %}
{% set prop1 = contact.prop1 %} {# prop1 is 'N/A' #}
{% set prop2 = contact.prop2 %} {# prop2 is 'Something here' #}
Prop1: [{{ prop1 }}]
{% if prop1|upper != n_a %}
<li>Prop1: [{{ prop1 }}]</li>
{% endif %}
Prop2: [{{ prop2 }}]
{% if prop2|upper != n_a %}
<li>Prop2: {{ prop2 }}</li>
{% endif %}
and the result:
Prop1: [N/A]
Prop1: [N/A]
Prop2: [Something here]
Prop2: [Something here]
so basically if statements are not supported yet in email templates, but only in CMS and Blog pages.
Anyone having this issues please upvote these ideas (as @MatthewShepherd mentioned in the other thread):
https://community.hubspot.com/t5/HubSpot-Ideas/if-statements-in-email-templates/idi-p/282907
Thank you!