<?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: Execution finished by For Statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015520#M638127</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to reproduce the same scenery in a example but I can't.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I found the problem but like you said QV start to beheva weird, the thing is that below the for i have a drop table to the table Product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14616114318339090" jivemacro_uid="_14616114318339090"&gt;
&lt;P&gt;FOR i=0 to $(v.Product)-1&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; TRACE For statement;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET v.Table = DATE(Today(),'YYYYMMDD');&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; NOCONCATENATE&lt;/P&gt;
&lt;P&gt;&amp;nbsp; [$(v.Table)]:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load *&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resident AA;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Next;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP TABLE $(v.ProductTable);&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the v.productTable doesn't exist, the 'drop table' shows error message. But in my code only end the execution. In the example actually shows a error message.&lt;/P&gt;&lt;P&gt;4/25/2016 3:50:36 PM: 0034&amp;nbsp; LET v.Product = NoOfRows('Product')&lt;/P&gt;&lt;P&gt;4/25/2016 3:50:36 PM: 0036&amp;nbsp; FOR i=0 to -1&amp;nbsp; &lt;/P&gt;&lt;P&gt;4/25/2016 3:50:36 PM: 0048&amp;nbsp; DROP TABLE Product&lt;/P&gt;&lt;P&gt;4/25/2016 3:50:36 PM:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Execution finished.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If my code I put a trace statement before and after the drop table QV says doesn't exist the table and shows a error message.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="dt.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/122664_dt.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, this is &lt;SPAN style="font-size: 13.3333330154419px;"&gt;weird.. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well!, thank all for your comments&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Agustin. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Apr 2016 19:28:44 GMT</pubDate>
    <dc:creator>agustinbobba</dc:creator>
    <dc:date>2016-04-25T19:28:44Z</dc:date>
    <item>
      <title>Execution finished by For Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015506#M638113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my script I use an iteration statement for several loads, then I load other tables; something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14615964244596076 jive_text_macro" jivemacro_uid="_14615964244596076" modifiedtitle="true"&gt;
&lt;P&gt;LET v.Product = NoOfRows('$(v.ProductTable)');&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;FOR i=0 to $(v.&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;Product&lt;/SPAN&gt;)-1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load *&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resident AA;&lt;/P&gt;
&lt;P&gt;Next;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;ProductDetail:&lt;/P&gt;
&lt;P&gt;Load *&lt;/P&gt;
&lt;P&gt;Resident [Product Detail];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I execute the Script without Errors, but then realized that the execution of the script was not complete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I saw on the log and I found that the variable v.Product was equals to -1, so never load the table ProductDetail; this table is out of the for statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My log:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14615970076265360" jivemacro_uid="_14615970076265360"&gt;
&lt;P&gt;25-Apr-16 11:46:47: 5437&amp;nbsp; FOR i=0 to -1&lt;/P&gt;
&lt;P&gt;25-Apr-16 11:46:48:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Execution finished.&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a bug?, when the for is from 0 to -1 the scipt stop without error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Agustín&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Ediit] FOR i=0 to $(v.Product)-1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 15:16:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015506#M638113</guid>
      <dc:creator>agustinbobba</dc:creator>
      <dc:date>2016-04-25T15:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Execution finished by For Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015507#M638114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you mean to put $(v.Product) - 1 instead of $(v.ProductTable) - 1?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try with $(v.Product) since that's the variable storing the number of rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 15:27:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015507#M638114</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2016-04-25T15:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Execution finished by For Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015508#M638115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it should be:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="keyword" style="font-style: inherit; font-weight: inherit; line-height: 1.5em; color: #006699; font-size: 9pt !important;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="keyword" style="font-style: inherit; font-weight: inherit; line-height: 1.5em; color: #006699; font-size: 9pt !important;"&gt;FOR&lt;/SPAN&gt;&lt;SPAN style="color: black; font-style: inherit; font-weight: inherit; line-height: 1.5em; font-size: 9pt !important;"&gt; i=0 &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-style: inherit; font-weight: inherit; line-height: 1.5em; color: #006699; font-size: 9pt !important;"&gt;to&lt;/SPAN&gt;&lt;SPAN style="color: black; font-style: inherit; font-weight: inherit; line-height: 1.5em; font-size: 9pt !important;"&gt; $(v.Product) - 1&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 15:32:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015508#M638115</guid>
      <dc:creator>trdandamudi</dc:creator>
      <dc:date>2016-04-25T15:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: Execution finished by For Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015509#M638116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry my example was wrong, yes the &lt;SPAN style="font-size: 13.3333330154419px;"&gt;FOR &lt;/SPAN&gt;statement is like you said: &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;FOR i=0 to $(v.Product)-1&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 15:33:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015509#M638116</guid>
      <dc:creator>agustinbobba</dc:creator>
      <dc:date>2016-04-25T15:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Execution finished by For Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015510#M638117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then either something is wrong with v.ProductTable variable. Take a look at if this variable &lt;SPAN style="font-size: 13.3333px;"&gt;is &lt;/SPAN&gt;empty.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 15:35:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015510#M638117</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2016-04-25T15:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Execution finished by For Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015511#M638118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes indeed, the problem is when this variable is equal to 0, so the FOR fail.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 15:36:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015511#M638118</guid>
      <dc:creator>agustinbobba</dc:creator>
      <dc:date>2016-04-25T15:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Execution finished by For Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015512#M638119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I found the problem, but I don't understand why qlikview cut the execution of the script when the FOR go to 0 to -1, and not shows an error message, only cut the execution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 15:49:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015512#M638119</guid>
      <dc:creator>agustinbobba</dc:creator>
      <dc:date>2016-04-25T15:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: Execution finished by For Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015513#M638120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Agustín,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Qlik script is having the proper behaviour. A loop from 0 to -1 should not fail, since there is no error at all. Just the condition is not met, so the script keeps executing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest you to control the value of v.Product beforre the FOR sentence, and skip it (or do what you want) in case v.Product = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Luis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 17:04:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015513#M638120</guid>
      <dc:creator>luis_pimentel</dc:creator>
      <dc:date>2016-04-25T17:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Execution finished by For Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015514#M638121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I understand that the condition is not met; but is not have the proper behavior, because, below the FOR statement I have other tables to load but qlikview stopped the execution right after the FOR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 17:51:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015514#M638121</guid>
      <dc:creator>agustinbobba</dc:creator>
      <dc:date>2016-04-25T17:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: Execution finished by For Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015515#M638122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Two remarks (each probably worth 1ct so it all sums up to "my 2cts")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The table for which you try to find the number of rows doesn't exist. NoOfRows returns NULL, &lt;EM&gt;not&lt;/EM&gt; 0 because that's a value that indicates an empty but existing table. The FOR loop still has a valid syntax because the $-sign expansion for $(v.Product) will produce nothing and only the -1 part will remain.&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FOR i = 0 TO -1&lt;/SPAN&gt; should never produce an error because it isn't an invalid specificaiton. If you consult the QV Desktop help on FOR NEXT, you will discover that the full syntax is: &lt;SPAN style="font-family: 'courier new', courier;"&gt;FOR var = expr1 TO expr2 [STEP expr3]&lt;/SPAN&gt; meaning that negative step values are allowed and therefore &lt;SPAN style="font-family: 'courier new', courier;"&gt;expr2&lt;/SPAN&gt; can be negative as well. The default step value of course is +1, but that doesn't affect the validity of the FOR specification or its workings. The one you have on your hands will just never execute a single cycle.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 18:14:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015515#M638122</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2016-04-25T18:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: Execution finished by For Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015516#M638123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Weird, I can't even reproduce your situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW remove the semicolon from the NEXT line and see if that works better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What version of QV Desktop are you using?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 18:23:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015516#M638123</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2016-04-25T18:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: Execution finished by For Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015517#M638124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the debug window to help find the problem with your script. From the script edit screen you can enable debug mode and step through your script or add breakpoints. As you step through the code you can see the last executed step, the next step and the state of any variables. This should help you see how QlikView is interpreting your script. It may help to add some trace commands to see the values of variables as the script executes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 18:23:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015517#M638124</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2016-04-25T18:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Execution finished by For Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015518#M638125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using 11.20 SR12 64 bits Edition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Agustin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 18:27:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015518#M638125</guid>
      <dc:creator>agustinbobba</dc:creator>
      <dc:date>2016-04-25T18:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: Execution finished by For Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015519#M638126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What happens if you delete the FOR loop (including the Next;-line) and rewrite afresh?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another hint: QV Desktop may start to behave in very weird (even absurd) ways if kept open for very long and performing a large number of failed reloads in succession. Does it help if you save your document, close QV Desktop and reopen it to reload again?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 18:29:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015519#M638126</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2016-04-25T18:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: Execution finished by For Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015520#M638127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to reproduce the same scenery in a example but I can't.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I found the problem but like you said QV start to beheva weird, the thing is that below the for i have a drop table to the table Product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14616114318339090" jivemacro_uid="_14616114318339090"&gt;
&lt;P&gt;FOR i=0 to $(v.Product)-1&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; TRACE For statement;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET v.Table = DATE(Today(),'YYYYMMDD');&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; NOCONCATENATE&lt;/P&gt;
&lt;P&gt;&amp;nbsp; [$(v.Table)]:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load *&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resident AA;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Next;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP TABLE $(v.ProductTable);&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the v.productTable doesn't exist, the 'drop table' shows error message. But in my code only end the execution. In the example actually shows a error message.&lt;/P&gt;&lt;P&gt;4/25/2016 3:50:36 PM: 0034&amp;nbsp; LET v.Product = NoOfRows('Product')&lt;/P&gt;&lt;P&gt;4/25/2016 3:50:36 PM: 0036&amp;nbsp; FOR i=0 to -1&amp;nbsp; &lt;/P&gt;&lt;P&gt;4/25/2016 3:50:36 PM: 0048&amp;nbsp; DROP TABLE Product&lt;/P&gt;&lt;P&gt;4/25/2016 3:50:36 PM:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Execution finished.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If my code I put a trace statement before and after the drop table QV says doesn't exist the table and shows a error message.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="dt.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/122664_dt.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, this is &lt;SPAN style="font-size: 13.3333330154419px;"&gt;weird.. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well!, thank all for your comments&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Agustin. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 19:28:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execution-finished-by-For-Statement/m-p/1015520#M638127</guid>
      <dc:creator>agustinbobba</dc:creator>
      <dc:date>2016-04-25T19:28:44Z</dc:date>
    </item>
  </channel>
</rss>

