Hi All,
did someone manage to get the IF clause running with checking NULL values on an OptionSet?
Because if you create an if, for example
{{#if (eq contact.foc_category 123456789)}}A{{else}}B{{/if}}
the else clause gets not evaluated. I have no possibility to react on empty values of an OptionSet.
I tried several expressions, none of them were successful and the documentation doesn't say anything about NULL.
Any inputs highly appreciated.
Thank you and BR,
Philipp
Hi Clofly,
thanks, this was very informative, however I still think this is a MUST have feature.
If any one is looking for the same, I created an idea:
Best regards,
Philipp
Hi Philipp,
Dynamic expression in marketing email uses "Handlebars.js" library.
The if statements {{# if}}{{/if}} is called Helpers in the library.(also {{#each }}{{/each}})
As the library doc introduced: If the argument returns false, undefined, null, "", 0, or [], Handlebars will not render the block.
It can be said that there is no method to handle NULL string situation with built-in helper({{#if}}),
and due to javascript will be blocked in marketing email, so currently we couldn't extend or build our custom helper to handle NULL string situation.
Thanks for exploring features and discovered something which could get improvement,
please suggest it to Ideas forum to wait whether it could be fixed next update.
Regards,
Clofly
André Arnaud de Cal...
292,162
Super User 2025 Season 1
Martin Dráb
230,962
Most Valuable Professional
nmaenpaa
101,156