<?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: script error when combine SubStringCount and Concat function in IF staement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/script-error-when-combine-SubStringCount-and-Concat-function-in/m-p/696500#M667386</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to continue with this question a little bit more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see attached image, here I create several list boxes which allow users to make selections, user pick the selection and assign a value to a variable. &lt;/P&gt;&lt;P&gt;For example, vDIMXref (I create this variable in user interface), when I select XREF_Product_Master in list box,&amp;nbsp; then vDIMXref get 1.&lt;/P&gt;&lt;P&gt;Then I want to use this variable in script to decide if load table 'XREF_Product_Master' or not, here I can not succeed, I got a error message in attached image.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2014-10-26 23-47-51.jpg" class="jive-image" src="/legacyfs/online/69714_2014-10-26 23-47-51.jpg" style="width: 620px; height: 288px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2014-10-27 00-05-25.jpg" class="jive-image" src="/legacyfs/online/69715_2014-10-27 00-05-25.jpg" style="width: 620px; height: 297px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 26 Oct 2014 23:07:29 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-10-26T23:07:29Z</dc:date>
    <item>
      <title>script error when combine SubStringCount and Concat function in IF staement</title>
      <link>https://community.qlik.com/t5/QlikView/script-error-when-combine-SubStringCount-and-Concat-function-in/m-p/696497#M667383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;try to use bellow statement to decide if load a table into the document in script. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF(SubStringCount(Concat(%DIM_LOADING_SERIES, '|'), 'XREF_Product_Master')&amp;gt;0) THEN&lt;/P&gt;&lt;P&gt;.........;&lt;/P&gt;&lt;P&gt;ENDIF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While I got error message shows,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Script line error&lt;/P&gt;&lt;P&gt;IF(SubStringCount(Concat(%DIM_LOADING_SERIES, '|'), 'XREF_Product_Master')&amp;gt;0) THEN"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do have the DIM_LOADING_SERIES loaded and selected in the front-end, then what could be the reason for error? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2014-10-25 19-34-45.jpg" class="jive-image" src="/legacyfs/online/69704_2014-10-25 19-34-45.jpg" /&gt;&lt;/P&gt;&lt;DIV&gt;Thanks a lot!&lt;/DIV&gt;&lt;DIV&gt;Alex&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Oct 2014 17:39:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/script-error-when-combine-SubStringCount-and-Concat-function-in/m-p/696497#M667383</guid>
      <dc:creator />
      <dc:date>2014-10-25T17:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: script error when combine SubStringCount and Concat function in IF staement</title>
      <link>https://community.qlik.com/t5/QlikView/script-error-when-combine-SubStringCount-and-Concat-function-in/m-p/696498#M667384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can reference fields directly in aggregation functions only in load statements, not in if-then blocks. You can do it this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD substringcount(concat(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;%DIM_LOADING_SERIES, '|'&lt;/SPAN&gt;),'&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;XREF_Product_Master&lt;/SPAN&gt;') as TestResult&lt;/P&gt;&lt;P&gt;RESIDENT DIM_LOADING_FILES;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF (peek('TestResult')) THEN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // do stuff&lt;/P&gt;&lt;P&gt;ENDIF&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Oct 2014 18:09:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/script-error-when-combine-SubStringCount-and-Concat-function-in/m-p/696498#M667384</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-10-25T18:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: script error when combine SubStringCount and Concat function in IF staement</title>
      <link>https://community.qlik.com/t5/QlikView/script-error-when-combine-SubStringCount-and-Concat-function-in/m-p/696499#M667385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Gysbert, the solution works perfect!&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Oct 2014 19:31:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/script-error-when-combine-SubStringCount-and-Concat-function-in/m-p/696499#M667385</guid>
      <dc:creator />
      <dc:date>2014-10-25T19:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: script error when combine SubStringCount and Concat function in IF staement</title>
      <link>https://community.qlik.com/t5/QlikView/script-error-when-combine-SubStringCount-and-Concat-function-in/m-p/696500#M667386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to continue with this question a little bit more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see attached image, here I create several list boxes which allow users to make selections, user pick the selection and assign a value to a variable. &lt;/P&gt;&lt;P&gt;For example, vDIMXref (I create this variable in user interface), when I select XREF_Product_Master in list box,&amp;nbsp; then vDIMXref get 1.&lt;/P&gt;&lt;P&gt;Then I want to use this variable in script to decide if load table 'XREF_Product_Master' or not, here I can not succeed, I got a error message in attached image.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2014-10-26 23-47-51.jpg" class="jive-image" src="/legacyfs/online/69714_2014-10-26 23-47-51.jpg" style="width: 620px; height: 288px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2014-10-27 00-05-25.jpg" class="jive-image" src="/legacyfs/online/69715_2014-10-27 00-05-25.jpg" style="width: 620px; height: 297px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Oct 2014 23:07:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/script-error-when-combine-SubStringCount-and-Concat-function-in/m-p/696500#M667386</guid>
      <dc:creator />
      <dc:date>2014-10-26T23:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: script error when combine SubStringCount and Concat function in IF staement</title>
      <link>https://community.qlik.com/t5/QlikView/script-error-when-combine-SubStringCount-and-Concat-function-in/m-p/696501#M667387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like your variable vDIMXref contains an = sign in front of the expression. If that's correct you need to remove it. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2014 08:51:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/script-error-when-combine-SubStringCount-and-Concat-function-in/m-p/696501#M667387</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-10-27T08:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: script error when combine SubStringCount and Concat function in IF staement</title>
      <link>https://community.qlik.com/t5/QlikView/script-error-when-combine-SubStringCount-and-Concat-function-in/m-p/696502#M667388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when I remove the '=' sign, then the variable does not work, I define them in front end, then I need a '=' to calcuate value&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2014-10-27 12-36-04.jpg" class="jive-image" src="/legacyfs/online/69747_2014-10-27 12-36-04.jpg" style="width: 620px; height: 473px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2014-10-27 12-36-30.jpg" class="jive-image" src="/legacyfs/online/69748_2014-10-27 12-36-30.jpg" style="width: 620px; height: 473px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2014-10-27 12-29-09.jpg" class="jive-image" src="/legacyfs/online/69746_2014-10-27 12-29-09.jpg" style="width: 620px; height: 336px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2014 11:38:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/script-error-when-combine-SubStringCount-and-Concat-function-in/m-p/696502#M667388</guid>
      <dc:creator />
      <dc:date>2014-10-27T11:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: script error when combine SubStringCount and Concat function in IF staement</title>
      <link>https://community.qlik.com/t5/QlikView/script-error-when-combine-SubStringCount-and-Concat-function-in/m-p/696503#M667389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think I said to remove the = sign from all your variables. But you will have to remove it from the expression in &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;vDIMXref &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2014 17:28:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/script-error-when-combine-SubStringCount-and-Concat-function-in/m-p/696503#M667389</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-10-27T17:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: script error when combine SubStringCount and Concat function in IF staement</title>
      <link>https://community.qlik.com/t5/QlikView/script-error-when-combine-SubStringCount-and-Concat-function-in/m-p/696504#M667390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert, from your solution to wava1978 (&lt;A _jive_internal="true" href="https://community.qlik.com/thread/65816"&gt;http://community.qlik.com/thread/65816&lt;/A&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;), this is exactly the reason for my issue, perfect solution, thank you very much! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/laugh.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Nov 2014 23:22:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/script-error-when-combine-SubStringCount-and-Concat-function-in/m-p/696504#M667390</guid>
      <dc:creator />
      <dc:date>2014-11-09T23:22:20Z</dc:date>
    </item>
  </channel>
</rss>

