<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: if then statement in email for deal property in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/if-then-statement-in-email-for-deal-property/m-p/1024353#M40199</link>
    <description>&lt;P&gt;Hey &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/760712"&gt;@Thompson_DHARMA&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check the type of the value using the type function:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{{ type(deal.deal_currency_codedeal.deal_currency_code) }}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it's not "str" try converting it using the string filter first.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best&lt;/P&gt;</description>
    <pubDate>Thu, 08 Aug 2024 20:56:02 GMT</pubDate>
    <dc:creator>Kevin-C</dc:creator>
    <dc:date>2024-08-08T20:56:02Z</dc:date>
    <item>
      <title>if then statement in email for deal property</title>
      <link>https://community.hubspot.com/t5/CMS-Development/if-then-statement-in-email-for-deal-property/m-p/1023997#M40189</link>
      <description>&lt;P&gt;I am using the edit HTML module in an email (not an email template) and trying to get the following bit of code to work:&lt;BR /&gt;&lt;BR /&gt;{% if deal.deal_currency_code == 'USD' %}&amp;lt;p&amp;gt;usd text&amp;lt;/p&amp;gt;{% else %}&amp;lt;p&amp;gt;non-usd text&amp;lt;/p&amp;gt;{% endif %}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am previewing it with the currency code property above it so that I can compare, but it only shows the else text.&lt;BR /&gt;&lt;BR /&gt;The issue is not letter case. What am I missing here?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 10:22:41 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/if-then-statement-in-email-for-deal-property/m-p/1023997#M40189</guid>
      <dc:creator>Thompson_DHARMA</dc:creator>
      <dc:date>2024-08-08T10:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: if then statement in email for deal property</title>
      <link>https://community.hubspot.com/t5/CMS-Development/if-then-statement-in-email-for-deal-property/m-p/1024040#M40191</link>
      <description>&lt;P&gt;I also ran a print test using this and it came back false, even though the test deal is definitely USD.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% if deal.deal_currency_code == "USD" %}&amp;lt;p&amp;gt;usd text&amp;lt;/p&amp;gt;{% else %}
&amp;lt;p&amp;gt;non-usd text {{ deal.deal_currency_code == "USD" }}&amp;lt;/p&amp;gt;{% endif %}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 12:12:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/if-then-statement-in-email-for-deal-property/m-p/1024040#M40191</guid>
      <dc:creator>Thompson_DHARMA</dc:creator>
      <dc:date>2024-08-08T12:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: if then statement in email for deal property</title>
      <link>https://community.hubspot.com/t5/CMS-Development/if-then-statement-in-email-for-deal-property/m-p/1024353#M40199</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/760712"&gt;@Thompson_DHARMA&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check the type of the value using the type function:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{{ type(deal.deal_currency_codedeal.deal_currency_code) }}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it's not "str" try converting it using the string filter first.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 20:56:02 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/if-then-statement-in-email-for-deal-property/m-p/1024353#M40199</guid>
      <dc:creator>Kevin-C</dc:creator>
      <dc:date>2024-08-08T20:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: if then statement in email for deal property</title>
      <link>https://community.hubspot.com/t5/CMS-Development/if-then-statement-in-email-for-deal-property/m-p/1024780#M40221</link>
      <description>&lt;P&gt;Thanks Kevin! With your advice I did use the string filter but it's still not working, unfortunately.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;We're tried all sorts:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% if personalization_token('deal.deal_currency_code') == 'USD' %}
&amp;lt;p&amp;gt;usd text&amp;lt;/p&amp;gt;
{% else %}
&amp;lt;p&amp;gt;non-usd text&amp;lt;/p&amp;gt;
{% endif %}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% set currency_code = personalization_token('deal.deal_currency_code') | string %}
{% if currency_code == 'USD' %}
&amp;lt;p&amp;gt;usd text&amp;lt;/p&amp;gt;
{% else %}
&amp;lt;p&amp;gt;non-usd text&amp;lt;/p&amp;gt;
{% endif %}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% set currency_code = deal.deal_currency_code |  string %}
{% if currency_code == "USD" %}
&amp;lt;p&amp;gt;usd text&amp;lt;/p&amp;gt;
{% else %}
&amp;lt;p&amp;gt;non-usd text&amp;lt;/p&amp;gt;
{% endif %}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2024 15:46:24 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/if-then-statement-in-email-for-deal-property/m-p/1024780#M40221</guid>
      <dc:creator>Thompson_DHARMA</dc:creator>
      <dc:date>2024-08-09T15:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: if then statement in email for deal property</title>
      <link>https://community.hubspot.com/t5/CMS-Development/if-then-statement-in-email-for-deal-property/m-p/1024802#M40223</link>
      <description>&lt;P&gt;I have solved this myself. I created a Module in Design Manager and entered this code.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% set currency_code = deal.deal_currency_code | string %}
{% if currency_code == "USD" %}
&amp;lt;p&amp;gt;usd text&amp;lt;/p&amp;gt;
{% else %}
&amp;lt;p&amp;gt;non-usd text&amp;lt;/p&amp;gt;
{% endif %}&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 09 Aug 2024 16:07:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/if-then-statement-in-email-for-deal-property/m-p/1024802#M40223</guid>
      <dc:creator>Thompson_DHARMA</dc:creator>
      <dc:date>2024-08-09T16:07:52Z</dc:date>
    </item>
  </channel>
</rss>

