Skip to main content

Notifications

Announcements

No record found.

Customer Insights - Journeys forum
Answered

Error with conditional statements and comparisons 'Dynamic content contains a conditional statement that compares values of different types'

Posted on by 5

I'm looking to add some conditional content using the statement below:

{{#if (eq contact.contractstate 'Settled')}}

Dummy text for settled contracts.

{{else}}

Dummy text for all other contracts.

{{/if}}

The field contact.contractstate is a 'choice' data type. Could this be the reason why I'm getting this error?

> Dynamic content contains a conditional statement that compares values of different types: {{#if (eq contact.ava_contractstate 'Settled')}}.

Categories:
  • Verified answer
    Leah Ju Profile Picture
    Leah Ju Microsoft Employee on at
    RE: Error with conditional statements and comparisons 'Dynamic content contains a conditional statement that compares values of different types'

    Hi Lauren,

    As you said: The field contact.contractstate is a 'choice' data type.

    For the choice column, it has two components: Label and Value.

    pastedimage1680054470273v1.png

    You should use value in your conditional content, like this:

    {{#if (eq contact.contractstate 1)}}

     ...

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,353 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,251 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans