Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Answered

Checking for NULL fields in Marketing Mails

(1) ShareShare
ReportReport
Posted on by 145

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

  • Philipp Focust Profile Picture
    Philipp Focust 145 on at
    RE: Checking for NULL fields in Marketing Mails

    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:

    experience.dynamics.com/.../

    Best regards,

    Philipp

  • Verified answer
    cloflyMao Profile Picture
    cloflyMao 25,202 on at
    RE: Checking for NULL fields in Marketing Mails

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,162 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans