<?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 How to avoid executing the code is the field in the code are blank in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-avoid-executing-the-code-is-the-field-in-the-code-are/m-p/165383#M37705</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;Attitude wrote:&lt;BR /&gt;&amp;lt;pre&amp;gt;&lt;BR /&gt;Jonathan Dienst wrote:&lt;BR /&gt;This should do the trick:&lt;BR /&gt;=If(Len(FINISHPERIOD) &amp;gt; 0 And Len(FINISH_YEAR) &amp;gt; 0, FINISHPERIOD &amp;amp; '-' &amp;amp; right(FINISH_YEAR, 2))&amp;lt;div&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Just now I did exactly the same thing and seeing your code after that. Many thanks for your support.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="CLEAR:both;"&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi&lt;BR /&gt;To be on the safe side, you might also use trim:&lt;/P&gt;&lt;P&gt;len&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;(trim(FINISHPERIOD))&amp;gt;0&lt;/P&gt;&lt;P&gt;Rgds&lt;BR /&gt;Jonas&lt;/P&gt;&lt;P&gt;Consultant @ Optivasys | &lt;A href="http://www.optivasys.se"&gt;http://www.optivasys.se&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Jan 2011 09:25:07 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-01-12T09:25:07Z</dc:date>
    <item>
      <title>How to avoid executing the code is the field in the code are blank</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-avoid-executing-the-code-is-the-field-in-the-code-are/m-p/165380#M37702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Below is the code I am using in the dimension field for displaying the something like A1-09, where A1 is the month and 09 is the year as per our understanding. I don't want the below code to be executed if FINISHPERIOD and FINISH_YEAR are blank. Please let me know how to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;=FINISHPERIOD&amp;amp;'-'&amp;amp;right(FINISH_YEAR,2)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;See the below image, I think I am getting - (because of this &amp;amp;'-'&amp;amp; in the above code)when both the fields are blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jan 2011 08:03:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-avoid-executing-the-code-is-the-field-in-the-code-are/m-p/165380#M37702</guid>
      <dc:creator />
      <dc:date>2011-01-12T08:03:18Z</dc:date>
    </item>
    <item>
      <title>How to avoid executing the code is the field in the code are blank</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-avoid-executing-the-code-is-the-field-in-the-code-are/m-p/165381#M37703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;This should do the trick:&lt;/P&gt;&lt;P&gt;=If(Len(FINISHPERIOD) &amp;gt; 0 And Len(FINISH_YEAR) &amp;gt; 0, FINISHPERIOD &amp;amp; '-' &amp;amp; right(FINISH_YEAR, 2))&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jan 2011 08:21:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-avoid-executing-the-code-is-the-field-in-the-code-are/m-p/165381#M37703</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2011-01-12T08:21:21Z</dc:date>
    </item>
    <item>
      <title>How to avoid executing the code is the field in the code are blank</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-avoid-executing-the-code-is-the-field-in-the-code-are/m-p/165382#M37704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;Jonathan Dienst wrote:&lt;BR /&gt;This should do the trick:&lt;BR /&gt;=If(Len(FINISHPERIOD) &amp;gt; 0 And Len(FINISH_YEAR) &amp;gt; 0, FINISHPERIOD &amp;amp; '-' &amp;amp; right(FINISH_YEAR, 2))&amp;lt;div&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Just now I did exactly the same thing and seeing your code after that. Many thanks for your support.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jan 2011 08:26:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-avoid-executing-the-code-is-the-field-in-the-code-are/m-p/165382#M37704</guid>
      <dc:creator />
      <dc:date>2011-01-12T08:26:30Z</dc:date>
    </item>
    <item>
      <title>How to avoid executing the code is the field in the code are blank</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-avoid-executing-the-code-is-the-field-in-the-code-are/m-p/165383#M37705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;Attitude wrote:&lt;BR /&gt;&amp;lt;pre&amp;gt;&lt;BR /&gt;Jonathan Dienst wrote:&lt;BR /&gt;This should do the trick:&lt;BR /&gt;=If(Len(FINISHPERIOD) &amp;gt; 0 And Len(FINISH_YEAR) &amp;gt; 0, FINISHPERIOD &amp;amp; '-' &amp;amp; right(FINISH_YEAR, 2))&amp;lt;div&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Just now I did exactly the same thing and seeing your code after that. Many thanks for your support.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="CLEAR:both;"&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi&lt;BR /&gt;To be on the safe side, you might also use trim:&lt;/P&gt;&lt;P&gt;len&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;(trim(FINISHPERIOD))&amp;gt;0&lt;/P&gt;&lt;P&gt;Rgds&lt;BR /&gt;Jonas&lt;/P&gt;&lt;P&gt;Consultant @ Optivasys | &lt;A href="http://www.optivasys.se"&gt;http://www.optivasys.se&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jan 2011 09:25:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-avoid-executing-the-code-is-the-field-in-the-code-are/m-p/165383#M37705</guid>
      <dc:creator />
      <dc:date>2011-01-12T09:25:07Z</dc:date>
    </item>
    <item>
      <title>How to avoid executing the code is the field in the code are blank</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-avoid-executing-the-code-is-the-field-in-the-code-are/m-p/165384#M37706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jonas!&lt;/P&gt;&lt;P&gt;You are right too...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jan 2011 10:10:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-avoid-executing-the-code-is-the-field-in-the-code-are/m-p/165384#M37706</guid>
      <dc:creator />
      <dc:date>2011-01-12T10:10:24Z</dc:date>
    </item>
  </channel>
</rss>

