DanielJohnson2
3 years agoQrew Trainee
Jinja2 Pipelines question, so nothing if field is empty
Hi All,
I'm trying to get a pipelines email step to only show the text "Call Rating:" if the call rating field is not blank. I've tried:
I'm trying to get a pipelines email step to only show the text "Call Rating:" if the call rating field is not blank. I've tried:
{% if c.call_rating != '' %}
Call Rating: {{c.call_rating}}
{% else %}
''
{% endif %}
and
{% if c.call_rating is defined %}
Call Rating: {{c.call_rating}}
{% else %}
''
{% endif %}
But the resulting email from both of those when that field is blank still says:
Call Rating:
Any idea how to get it so that line doesn't show in the email if that field is blank?
Thanks,
------------------------------
Daniel Johnson
------------------------------