<?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: Email hide/show logic - blank field value not returning as blank in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Email-hide-show-logic-blank-field-value-not-returning-as-blank/m-p/1071357#M41329</link>
    <description>&lt;P&gt;Hey Anton,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the examples,I really appreciate it! Unfortunately (luckily?), we will not be using the logic now...handling through automation tracks instead. But I'll definitely keep poking around on this as I'm sure it'll come up in the future.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are using completely custom HTML for the email in Design Manager - no drag/drop, modules, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;</description>
    <pubDate>Mon, 18 Nov 2024 23:06:56 GMT</pubDate>
    <dc:creator>creedy</dc:creator>
    <dc:date>2024-11-18T23:06:56Z</dc:date>
    <item>
      <title>Email hide/show logic - blank field value not returning as blank</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Email-hide-show-logic-blank-field-value-not-returning-as-blank/m-p/1070340#M41311</link>
      <description>&lt;P&gt;In a custom HTML email, I want to show/hide content based on a value within a field that has the internal name of "drupal_uid" in "Contacts".&lt;BR /&gt;&lt;BR /&gt;Here's a super simple example:&lt;BR /&gt;&lt;BR /&gt;{% if contact.drupal_uid %}&lt;/P&gt;&lt;P&gt;&amp;lt;p&amp;gt;Content is hidden because DRUPAL_UID has a value.&amp;lt;/p&amp;gt;&lt;/P&gt;&lt;P&gt;{% else %}&lt;/P&gt;&lt;P&gt;&amp;lt;p&amp;gt;Content is shown because DRUPAL_UID is blank or undefined&amp;lt;/p&amp;gt;&lt;/P&gt;&lt;P&gt;{% endif %}&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 2 contacts I'm testing with - one has a value, one doesn't.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is they are both returning "Content hidden" when the contact without a value should fall under the else statement "Content shown".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 19:21:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Email-hide-show-logic-blank-field-value-not-returning-as-blank/m-p/1070340#M41311</guid>
      <dc:creator>creedy</dc:creator>
      <dc:date>2024-11-15T19:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Blank field values not...blank?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Email-hide-show-logic-blank-field-value-not-returning-as-blank/m-p/1070342#M41312</link>
      <description>&lt;P&gt;I've verified the contact with no value has this for the field...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="creedy_0-1731698021369.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/131745iA1CCB1903313CF15/image-size/medium?v=v2&amp;amp;px=400" role="button" title="creedy_0-1731698021369.png" alt="creedy_0-1731698021369.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But the if/then thinks it has a value.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 19:14:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Email-hide-show-logic-blank-field-value-not-returning-as-blank/m-p/1070342#M41312</guid>
      <dc:creator>creedy</dc:creator>
      <dc:date>2024-11-15T19:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Email hide/show logic - blank field value not returning as blank</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Email-hide-show-logic-blank-field-value-not-returning-as-blank/m-p/1070412#M41313</link>
      <description>&lt;P&gt;More info: I can display the field value in a rendered email just fine, but it won't work in logic blocks.&lt;BR /&gt;&lt;BR /&gt;Are fields with blank values actually not blank? Are there extra characters, white-space, etc?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 22:08:46 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Email-hide-show-logic-blank-field-value-not-returning-as-blank/m-p/1070412#M41313</guid>
      <dc:creator>creedy</dc:creator>
      <dc:date>2024-11-15T22:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Blank field values not...blank?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Email-hide-show-logic-blank-field-value-not-returning-as-blank/m-p/1070849#M41322</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/848866"&gt;@creedy&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to my knowledge the simplified logic like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% if X %}
Do something if X is true
{% else %}
Do something if X is false/not true
{% endif %}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;is only behaving as a boolean(true/false).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sometimes - especially with properties, you want to provide a bit more context like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% if contact.drupal_uid != null %}
&amp;lt;p&amp;gt;Content is hidden because DRUPAL_UID has a value.&amp;lt;/p&amp;gt;
{% else %}
&amp;lt;p&amp;gt;Content is shown because DRUPAL_UID is blank or undefined&amp;lt;/p&amp;gt;
{% endif %} &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or with a unless-statement(basically the same as an if-statement but the reversed)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% unless contact.drupal_uid == "" %}
&amp;lt;p&amp;gt;Content is hidden because DRUPAL_UID has a value.&amp;lt;/p&amp;gt;
{% else %}
&amp;lt;p&amp;gt;Content is shown because DRUPAL_UID is blank or undefined&amp;lt;/p&amp;gt;
{% endunless %} &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;p.s. Do you have the "Programmable email module beta" feature enabled in the module?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2024-11-18 um 08.34.11.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/131799i27935C3416C1B321/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2024-11-18 um 08.34.11.png" alt="Bildschirmfoto 2024-11-18 um 08.34.11.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2024 07:35:00 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Email-hide-show-logic-blank-field-value-not-returning-as-blank/m-p/1070849#M41322</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2024-11-18T07:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Email hide/show logic - blank field value not returning as blank</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Email-hide-show-logic-blank-field-value-not-returning-as-blank/m-p/1071357#M41329</link>
      <description>&lt;P&gt;Hey Anton,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the examples,I really appreciate it! Unfortunately (luckily?), we will not be using the logic now...handling through automation tracks instead. But I'll definitely keep poking around on this as I'm sure it'll come up in the future.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are using completely custom HTML for the email in Design Manager - no drag/drop, modules, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2024 23:06:56 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Email-hide-show-logic-blank-field-value-not-returning-as-blank/m-p/1071357#M41329</guid>
      <dc:creator>creedy</dc:creator>
      <dc:date>2024-11-18T23:06:56Z</dc:date>
    </item>
  </channel>
</rss>

