<?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 Getting error for $ expansion variable check in If block in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Getting-error-for-expansion-variable-check-in-If-block/m-p/14614#M769188</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have variable vTotalCount which will be assigned through input box. I want to check if variable has value then set to variable value but if varibale doesnot hold value then it should be set to default value to 24.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;len&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;TRIM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vTotalCount)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;gt;0 ,&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vTotalCount&lt;/EM&gt;&lt;/STRONG&gt;,24)&amp;nbsp; - This expression working as expected.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I use $ expansion , I am getting an error as below-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/204928_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;len&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;TRIM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vTotalCount&lt;/EM&gt;&lt;/STRONG&gt;)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;))&amp;gt;0 ,&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vTotalCount&lt;/EM&gt;&lt;/STRONG&gt;,0) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Can someone please help me in this?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>ashishbhuyekar</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Getting error for $ expansion variable check in If block</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-error-for-expansion-variable-check-in-If-block/m-p/14614#M769188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have variable vTotalCount which will be assigned through input box. I want to check if variable has value then set to variable value but if varibale doesnot hold value then it should be set to default value to 24.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;len&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;TRIM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vTotalCount)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;gt;0 ,&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vTotalCount&lt;/EM&gt;&lt;/STRONG&gt;,24)&amp;nbsp; - This expression working as expected.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I use $ expansion , I am getting an error as below-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/204928_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;len&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;TRIM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vTotalCount&lt;/EM&gt;&lt;/STRONG&gt;)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;))&amp;gt;0 ,&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vTotalCount&lt;/EM&gt;&lt;/STRONG&gt;,0) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Can someone please help me in this?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-error-for-expansion-variable-check-in-If-block/m-p/14614#M769188</guid>
      <dc:creator>ashishbhuyekar</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error for $ expansion variable check in If block</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-error-for-expansion-variable-check-in-If-block/m-p/14615#M769189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it is working without dollar sign expansion, why do you want to use dollar sign expansion?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 11:59:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-error-for-expansion-variable-check-in-If-block/m-p/14615#M769189</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-06-12T11:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error for $ expansion variable check in If block</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-error-for-expansion-variable-check-in-If-block/m-p/14616#M769190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That seems very logical to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Imagine that vTotalCount either contains an empty string or a string composed of whitespace characters.&lt;/P&gt;&lt;P&gt;Then&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Trim(vTotalCount)&lt;/SPAN&gt; will take an empty or whitespace &lt;EM&gt;string&lt;/EM&gt; from the variable, remove all whitespace characters present and return a blank string in all cases.&lt;/LI&gt;&lt;LI&gt;However, in those same cases &lt;SPAN style="font-family: 'courier new', courier;"&gt;Trim($(vTotalCount))&lt;/SPAN&gt; will exapand to either &lt;SPAN style="font-family: 'courier new', courier;"&gt;Trim()&lt;/SPAN&gt; or &lt;SPAN style="font-family: 'courier new', courier;"&gt;Trim( )&lt;/SPAN&gt; without any parameter whatsoever. Which is an illegal function call.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sunny's question still stands. But if you really want to keep the $-sign expansion, then put the $(...)-expression between single quotes. &lt;SPAN style="font-family: 'courier new', courier;"&gt;Trim()&lt;/SPAN&gt; only operates on strings anyway...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Edit] Sorry, kept finding spelling errors...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 12:40:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-error-for-expansion-variable-check-in-If-block/m-p/14616#M769190</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2018-06-12T12:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error for $ expansion variable check in If block</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-error-for-expansion-variable-check-in-If-block/m-p/14617#M769191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny - You are correct, as it is working without $ expansion why to unnecessary complicate. Thanks for replying.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 12:53:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-error-for-expansion-variable-check-in-If-block/m-p/14617#M769191</guid>
      <dc:creator>ashishbhuyekar</dc:creator>
      <dc:date>2018-06-12T12:53:51Z</dc:date>
    </item>
  </channel>
</rss>

