Liquid Hide Field

Having issues hiding an empty web app item field. I am using -

{% if CessationDate == ‘’ %}{% else %}Cessation Date: {{this[‘CessationDate’] | date: “%d %B %Y”}}
{%endif%}

But it displays the item regardless of if the field content is blank or not. I have tried swapping ‘’ to blank, null and undefined but these don’t work either.

Any ideas?

I think it’s because you are not fully referencing the CessationDate in the IF statement. Shouldn’t it be this.CessationDate?

Therefore:

{% if this.CessationDate ... %}

then I’d probably do != null:

{% if this.CessationDate != null %}
Cessation Date: {{this[‘CessationDate’] | date: “%d %B %Y”}}
{% endif %}

You absolutely nailed it @Adam.Wilson! Can’t believe it missed that one. Thank you.