<?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 ... NEXT + DO while LOOP in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809304#M285636</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok. Let me put this way - I run the above code, the &lt;STRONG&gt;for...next&lt;/STRONG&gt; loop requests data from 3 web links. Now, link 2 returns no data because of some web server error so I end up with data from link 1 and link 3. &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I know that at link 2 there is some data stored and if I run the code above I will most probably get the data from link 2. &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;So, to avoid reloading whole script I want to put in &lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em;"&gt;do while loop&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; to loop until every single link returns data. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;In my script there's over 50 links so the do while loop must be nested into for ... next loop not the other way round.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Przemek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Nov 2014 22:04:17 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-11-24T22:04:17Z</dc:date>
    <item>
      <title>FOR ... NEXT + DO while LOOP</title>
      <link>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809300#M285632</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;I'm loading web data from several links. It happens that a request returns no data (supposedly web server issues) but if requested again it does return the data. I need to implement DO while LOOP into the below code so that when the requests returns no data the loop requests again until it gets the data. I've tried with FieldValue but ended up with errors. Any help will be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Links:&lt;/P&gt;
&lt;P&gt;LOAD * Inline [&lt;/P&gt;
&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.rates1.com"&gt;http://www.rates1.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.rates2.com"&gt;http://www.rates2.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.rates3.com"&gt;http://www.rates3.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Rates:&lt;/P&gt;
&lt;P&gt;LET vNoOfLinks = NoOfRows('Links');&lt;/P&gt;
&lt;P&gt;FOR i=0 to $(vNoOfLinks)-1;&lt;/P&gt;
&lt;P&gt;LET vLink = Peek('Link',$(i),'Links');&lt;/P&gt;
&lt;P&gt;LOAD &lt;/P&gt;
&lt;P&gt;&amp;nbsp; [@1:n] as Data&lt;/P&gt;
&lt;P&gt;FROM $(vLink) (fix, utf8);&lt;/P&gt;
&lt;P&gt;NEXT&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Przemek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2014 16:52:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809300#M285632</guid>
      <dc:creator />
      <dc:date>2014-11-24T16:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: FOR ... NEXT + DO while LOOP</title>
      <link>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809301#M285633</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;one solution could be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_143360_Pic1.JPG.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/71985_QlikCommunity_Thread_143360_Pic1.JPG.jpg" style="width: 620px; height: 400px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14168602719394926" jivemacro_uid="_14168602719394926"&gt;
&lt;P&gt;Links:&lt;/P&gt;
&lt;P&gt;LOAD * Inline [&lt;/P&gt;
&lt;P&gt;Link&lt;/P&gt;
&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.rates.com/"&gt;http://www.rates.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.rates1.com/"&gt;http://www.rates1.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.rates2.com/"&gt;http://www.rates2.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LET vNoOfLinks = NoOfRows('Links');&lt;/P&gt;
&lt;P&gt;FOR i=0 to $(vNoOfLinks)-1;&lt;/P&gt;
&lt;P&gt;LET vLink = Peek('Link',$(i),'Links');&lt;/P&gt;
&lt;P&gt;Rates:&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp; [@1:n] as Data&lt;/P&gt;
&lt;P&gt;FROM $(vLink) (fix, utf8);&lt;/P&gt;
&lt;P&gt;NEXT;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2014 20:15:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809301#M285633</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-11-24T20:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: FOR ... NEXT + DO while LOOP</title>
      <link>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809302#M285634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the file you've attached is just a reloaded code of mine? Am I missing something?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Przemek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2014 20:34:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809302#M285634</guid>
      <dc:creator />
      <dc:date>2014-11-24T20:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: FOR ... NEXT + DO while LOOP</title>
      <link>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809303#M285635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Przemek&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought you needed a version of your code that does not throw errors or am I missing something?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2014 21:34:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809303#M285635</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-11-24T21:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: FOR ... NEXT + DO while LOOP</title>
      <link>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809304#M285636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok. Let me put this way - I run the above code, the &lt;STRONG&gt;for...next&lt;/STRONG&gt; loop requests data from 3 web links. Now, link 2 returns no data because of some web server error so I end up with data from link 1 and link 3. &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I know that at link 2 there is some data stored and if I run the code above I will most probably get the data from link 2. &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;So, to avoid reloading whole script I want to put in &lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em;"&gt;do while loop&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; to loop until every single link returns data. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;In my script there's over 50 links so the do while loop must be nested into for ... next loop not the other way round.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Przemek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2014 22:04:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809304#M285636</guid>
      <dc:creator />
      <dc:date>2014-11-24T22:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: Re: FOR ... NEXT + DO while LOOP</title>
      <link>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809305#M285637</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;maybe like this?:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14168689026647740" jivemacro_uid="_14168689026647740"&gt;
&lt;P&gt;Links:&lt;/P&gt;
&lt;P&gt;LOAD * Inline [&lt;/P&gt;
&lt;P&gt;Link&lt;/P&gt;
&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.rates1.com"&gt;http://www.rates1.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.rates2.com"&gt;http://www.rates2.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LET vNoOfLinks = NoOfRows('Links');&lt;/P&gt;
&lt;P&gt;FOR i=0 to $(vNoOfLinks)-1;&lt;/P&gt;
&lt;P&gt;LET vLink = Peek('Link',$(i),'Links');&lt;/P&gt;
&lt;P&gt;LET vNoOfRowsRates = Alt(NoOfRows('Rates'),0);&lt;/P&gt;
&lt;P&gt;DO&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Rates:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp; [@1:n] as Data&lt;/P&gt;
&lt;P&gt;&amp;nbsp; FROM $(vLink) (fix, utf8);&lt;/P&gt;
&lt;P&gt;LOOP until NoOfRows('Rates') &amp;gt; $(vNoOfRowsRates);&lt;/P&gt;
&lt;P&gt;NEXT;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2014 22:41:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809305#M285637</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-11-24T22:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: FOR ... NEXT + DO while LOOP</title>
      <link>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809306#M285638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Beautiful! Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 09:34:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809306#M285638</guid>
      <dc:creator />
      <dc:date>2014-11-25T09:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: FOR ... NEXT + DO while LOOP</title>
      <link>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809307#M285639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're welcome&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 10:51:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809307#M285639</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-11-25T10:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: FOR ... NEXT + DO while LOOP</title>
      <link>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809308#M285640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm struggling with another loop - a tuned version of the last one. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 'Rates' consists of sets of data from Links. Each Link set (except the last one) should have exactly 10 records including '*increase*' string. However, due to web server issue, a load from a Link happens to return less than 10 records with the string. In such cases &lt;SPAN style="font-size: 10pt;"&gt;I need to load the data again from this very Link. The last Link set may return less than 10 records and that's ok.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea how to play this scenario?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Przemek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Nov 2014 23:35:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809308#M285640</guid>
      <dc:creator />
      <dc:date>2014-11-30T23:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: FOR ... NEXT + DO while LOOP</title>
      <link>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809309#M285641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why You do this inside Qlik View&amp;nbsp; ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2014 01:03:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809309#M285641</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-12-01T01:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: FOR ... NEXT + DO while LOOP</title>
      <link>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809310#M285642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, there are many reasons but the bottom line is that it's comfortable to get and process the data in QV. What would suggest otherwise?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2014 09:06:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809310#M285642</guid>
      <dc:creator />
      <dc:date>2014-12-01T09:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: FOR ... NEXT + DO while LOOP</title>
      <link>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809311#M285643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On Qlik You should use the Edit only for some configuration definition and load /join of data structures.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The read/load of URL files inside qlik is not recommended for many reasons - performance is the main reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generate a file, csv, a table, a qvx or better a qvd outside qlik is the best solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2014 23:36:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809311#M285643</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-12-02T23:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: FOR ... NEXT + DO while LOOP</title>
      <link>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809312#M285644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Process it before call Qlik.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any Progamming language do the job easly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Qlik is BI tool not a PL.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Dec 2014 17:52:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FOR-NEXT-DO-while-LOOP/m-p/809312#M285644</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-12-13T17:52:28Z</dc:date>
    </item>
  </channel>
</rss>

