Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
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')}}.

  • 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)}}

     ...

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans