web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Checking for NULL fields in Marketing Mails

(1) ShareShare
ReportReport
Posted on by 147

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

I have the same question (0)
  • Verified answer
    cloflyMao Profile Picture
    25,210 on at

    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

  • Philipp Focust Profile Picture
    147 on at

    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

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 189 Super User 2026 Season 1

#2
CU11031447-0 Profile Picture

CU11031447-0 100

#3
NeerajPawar Profile Picture

NeerajPawar 66

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans