<?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: For Each statement Error in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/For-Each-statement-Error/m-p/1454691#M35734</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;Thanks a lot Petter , &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Sorry to say but it still does not work . &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Is there any other solution you could recommend please. &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Thanks,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Ravi Shinge&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Jan 2018 09:11:27 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-01-12T09:11:27Z</dc:date>
    <item>
      <title>For Each statement Error</title>
      <link>https://community.qlik.com/t5/App-Development/For-Each-statement-Error/m-p/1454689#M35732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello guys ,&lt;/P&gt;&lt;P&gt;I am getting error plz find screenshot . ( unexpected token error) &lt;/P&gt;&lt;P&gt;here my code kindly let me know is there any problem with the script . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set vCounter = 0;&lt;/P&gt;&lt;P&gt;For Each vIdProject2018 in FieldValueList('Id Project');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Projectflow32018:&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;PIdate2018,&lt;/P&gt;&lt;P&gt;NewDateLOI,&lt;/P&gt;&lt;P&gt;NumberofFlow3hours*Projectspermonth as "Hours2018"&lt;/P&gt;&lt;P&gt;Resident [FinalMasterProject]&lt;/P&gt;&lt;P&gt;where "Id Project" = $(vIdProject2018);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vPIdate2018= Num(Peek('PIdate2018', 0, 'Projectflow32018'));&lt;/P&gt;&lt;P&gt;LET vNewDateLOI = Num(Peek('NewDateLOI', 0, 'Projectflow32018'));&lt;/P&gt;&lt;P&gt;LET vHours2018 = Num(Peek('Hours2018', 0, 'Projectflow32018'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; For vDate2018= Num($(vPIdate2018)) to Num($(vNewDateLOI))&lt;/P&gt;&lt;P&gt;&amp;nbsp; Data:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Load&lt;/P&gt;&lt;P&gt;&amp;nbsp; $(vIdProject2018) as "Id Project",&lt;/P&gt;&lt;P&gt;&amp;nbsp; $(vDate2018) as Projectdatesflow32018,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Num($(vHours2018))/(Num($(vNewDateLOI)) - Num($(vPIdate2018)))&amp;nbsp; as flow3Hoursspent2018&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AutoGenerate 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next vDate2018&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Drop Table Projectflow32018;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Next vIdProject2018&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 17:51:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/For-Each-statement-Error/m-p/1454689#M35732</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-11T17:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: For Each statement Error</title>
      <link>https://community.qlik.com/t5/App-Development/For-Each-statement-Error/m-p/1454690#M35733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The error message indicates that the $-sign expansion of vNewDateLOI variable is not numeric. If it was you wouldnt get an error message. Most likely the variable contains a NULL. So you can safeguard by wrapping the part after the &lt;STRONG&gt;to&lt;/STRONG&gt; in an Alt()-function like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Alt(Num($(vNewDateLOI)),0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even better would be to analyze why the statement&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 23.4126px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;LET vNewDateLOI = Num(Peek('NewDateLOI', 0, 'Projectflow32018'));&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;and why it returns a NULL and handle it immediately.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 20:36:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/For-Each-statement-Error/m-p/1454690#M35733</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-01-11T20:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: For Each statement Error</title>
      <link>https://community.qlik.com/t5/App-Development/For-Each-statement-Error/m-p/1454691#M35734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;Thanks a lot Petter , &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Sorry to say but it still does not work . &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Is there any other solution you could recommend please. &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Thanks,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Ravi Shinge&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2018 09:11:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/For-Each-statement-Error/m-p/1454691#M35734</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-12T09:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: For Each statement Error</title>
      <link>https://community.qlik.com/t5/App-Development/For-Each-statement-Error/m-p/1454692#M35735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think Petter is right and that the failure is caused from the wrong way to create and to call the variables. And there are some more and not only vNewDateLOI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The easiest way for checking would be to test your routine partly by commenting the other parts. I would just start with the first load only and check if variable within the where-clause worked - if they contained a string-value the variable would need to be wrapped with single-quotes like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where "Id Project" = &lt;STRONG&gt;'&lt;/STRONG&gt;$(vIdProject2018)&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After this I would check the further variables by adding them to trace-statements to see how they are evaluated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similar to the first mentioned variable-call are these statements:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(vIdProject2018) as "Id Project",&lt;/P&gt;&lt;P&gt;$(vDate2018) as Projectdatesflow32018,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2018 12:10:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/For-Each-statement-Error/m-p/1454692#M35735</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-01-12T12:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: For Each statement Error</title>
      <link>https://community.qlik.com/t5/App-Development/For-Each-statement-Error/m-p/1454693#M35736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello thanks for ur solutions ! &lt;/P&gt;&lt;P&gt;I am still not able to get solution. &lt;/P&gt;&lt;P&gt;But I guess I am getting null value here &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;NumberofFlow3hours*Projectspermonth as "Hours2018"&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Is it the right way to multiply two fields like above ... &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;both the fields has numerical values ..? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Kindlylet me know . &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;ravi &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2018 17:48:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/For-Each-statement-Error/m-p/1454693#M35736</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-12T17:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: For Each statement Error</title>
      <link>https://community.qlik.com/t5/App-Development/For-Each-statement-Error/m-p/1454694#M35737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do I understand it right that the routine runs without an error-message but the results within your target-table is different to your expectation?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case you could just extend your used variables/fields to the trace- and load-statements with their origin values and also something like isnum(Field) - I think it will be then quite obvious which of the values has different formats/values as expected. Further do also a check if your loop has so many iterations like you assume.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2018 18:49:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/For-Each-statement-Error/m-p/1454694#M35737</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-01-12T18:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: For Each statement Error</title>
      <link>https://community.qlik.com/t5/App-Development/For-Each-statement-Error/m-p/1454695#M35738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now actually for this below statement the value is null . &lt;STRONG&gt;vHours2018&lt;/STRONG&gt; &lt;STRONG&gt; is null . &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;LET vHours2018 = Num(Peek('Hours2018', 0, 'Projectflow32018'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So basically this is null&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;NumberofFlow3hours*Projectspermonth as "Hours2018"&amp;nbsp; . &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;So could u let me know how do I multiply &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;NumberofFlow3hours and&amp;nbsp; &lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: Helvetica;"&gt;&lt;STRONG&gt;Projectspermonth &lt;/STRONG&gt; both contains numerical values into another field as &lt;STRONG style="color: #3d3d3d; font-family: Helvetica;"&gt;Hours2018&lt;/STRONG&gt;. Have I multiplied them right way using right syntax . &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: Helvetica;"&gt;Kindly let me know . &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: Helvetica;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: Helvetica;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: Helvetica;"&gt;ravi &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Jan 2018 22:54:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/For-Each-statement-Error/m-p/1454695#M35738</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-14T22:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: For Each statement Error</title>
      <link>https://community.qlik.com/t5/App-Development/For-Each-statement-Error/m-p/1454696#M35739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would check within a separate load what your fields NumberofFlow3hours and Projectspermonth really contain - are there really values and if are they numbers too? A check on a number could be done with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;isnum(NumberofFlow3hours)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and if the value looked like a number but isnum() returned false the values needs to be converted with num#().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jan 2018 07:48:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/For-Each-statement-Error/m-p/1454696#M35739</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-01-15T07:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: For Each statement Error</title>
      <link>https://community.qlik.com/t5/App-Development/For-Each-statement-Error/m-p/1536496#M38710</link>
      <description>&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;I'm having some troubles with this example script from the &lt;EM&gt;Qlik&lt;/EM&gt; &lt;EM&gt;Sense Cookbook&amp;nbsp;&lt;/EM&gt;(find attached a picture).&lt;/P&gt;&lt;P&gt;I can execute the script and the display says that the App has been saved correctly but as you can see the CountrySales table is highlighted in red and no data gets loaded.&lt;/P&gt;&lt;P&gt;I know this is pretty basic but I need to understand the reason of this and how to load multiple files contained in one folder to create a single table.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&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;</description>
      <pubDate>Tue, 29 Jan 2019 12:32:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/For-Each-statement-Error/m-p/1536496#M38710</guid>
      <dc:creator>jmartinez</dc:creator>
      <dc:date>2019-01-29T12:32:14Z</dc:date>
    </item>
  </channel>
</rss>

