Forum Discussion
SeanConnaughto1
Qrew Cadet
You can use the {{CLEAR}} code:
{% if c.call_rating != '' %}
Call Rating: {{c.call_rating}}
{% else %}
{{CLEAR}}
{% endif %}
{% if c.call_rating is defined %}
Call Rating: {{c.call_rating}}
{% else %}
{{CLEAR}}
{% endif %}
Check out the documentation if you have the time, it's very helpful: https://help.quickbase.com/pipelines/transforming_data.html
------------------------------
Sean Connaughton
------------------------------
DanielJohnson2
4 years agoQrew Trainee
Hey Sean,
Thanks for the reply, but that didn't work. I still got "Call Rating:" in the email output with nothing after it.
------------------------------
Daniel Johnson
------------------------------
Thanks for the reply, but that didn't work. I still got "Call Rating:" in the email output with nothing after it.
------------------------------
Daniel Johnson
------------------------------
- DanielJohnson24 years agoQrew TraineeI just tried:
and got the same result. The output email still has "Call Rating:" with nothing after it.{% set rating = 'Call Rating: ' %} {% if c.call_rating is defined %} {{rating}}{{c.call_rating}} {% else %} {{CLEAR}} {% endif %}
------------------------------
Daniel Johnson
------------------------------ - SeanConnaughto14 years agoQrew CadetDoes this work?
{%- if c.call_rating %} Call Rating: {{c.call_rating}} {% else %} {{CLEAR}} {% endif -%}
------------------------------
Sean Connaughton
------------------------------- DanielJohnson24 years agoQrew TraineeIt's possible the {{CLEAR}} is clearing the entire email body because I keep getting an error that says "Validation error: {'body': 'required field'}" even though there's plenty of other text and fields in there before this part. Thoughts?
------------------------------
Daniel Johnson
------------------------------- SeanConnaughto14 years agoQrew CadetIf the if statement is included with the rest of the body text, then yes. The {{CLEAR}} will completely clear the entire field.
You could also create a conditional before the email step based on if c.call_rating is set or not. You could create the two outcomes: one email that includes the c.call_rating along with the rest of the body, the other that does not include c.call_rating.
------------------------------
Sean Connaughton
------------------------------