<?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: Do while with variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639952#M234562</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use peek('BoekLib', $(vFileNo), 'Lib') to run and read your Lib-Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 May 2014 12:06:14 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2014-05-20T12:06:14Z</dc:date>
    <item>
      <title>Do while with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639951#M234561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to load data from an Iseries.&lt;/P&gt;&lt;P&gt;And every bookyear is in another Company and also an other filepath(accesspath)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an excel with Year and CompanyNumber.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Boekjaar,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BoekLib&lt;/P&gt;&lt;P&gt;2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11E&lt;/P&gt;&lt;P&gt;2012&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12E&lt;/P&gt;&lt;P&gt;2013&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13E&lt;/P&gt;&lt;P&gt;2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14E&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have only need to refresh the last 2 years (current year and CurrentYear -1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I need to do a select like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;FROM S0678ADT.X62FIL&lt;STRONG&gt;13E&lt;/STRONG&gt;O.PBP;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select *&lt;/P&gt;&lt;P&gt;FROM S0678ADT.X62FIL&lt;STRONG&gt;14E&lt;/STRONG&gt;O.PBP;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example of my script where my BoekLib (in Yellow) is empty...&lt;/P&gt;&lt;P&gt;How can I fill up "BoekLib"?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="DOWHILE.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/59201_DOWHILE.PNG.png" /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 12:01:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639951#M234561</guid>
      <dc:creator>kris_vliegen</dc:creator>
      <dc:date>2014-05-20T12:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Do while with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639952#M234562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use peek('BoekLib', $(vFileNo), 'Lib') to run and read your Lib-Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 12:06:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639952#M234562</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-05-20T12:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: Do while with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639953#M234563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After your FOR iinstruction write:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET TMP = Peek('BoekLib',$(vFileNo)-1,'Lib'');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then replace your yellow BoekLib with $(TMP)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 12:07:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639953#M234563</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2014-05-20T12:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Do while with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639954#M234564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for te response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've made this script but I get an error (see below)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Dow1.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/59203_Dow1.PNG.png" /&gt;&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="DowError.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/59204_DowError.PNG.png" style="width: 620px; height: 659px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 12:15:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639954#M234564</guid>
      <dc:creator>kris_vliegen</dc:creator>
      <dc:date>2014-05-20T12:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Do while with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639955#M234565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;$(TMP) is a string and need to write with quotes: '$(TMP)'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 12:19:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639955#M234565</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-05-20T12:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Do while with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639956#M234566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LET vFileName = 'S0678ADT.X62FIL$(TMP)=.PBP'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 12:25:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639956#M234566</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2014-05-20T12:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Do while with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639957#M234567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;But I was expecting he was only giving the yellow records...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="tabeldow.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/59209_tabeldow.PNG.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 13:01:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639957#M234567</guid>
      <dc:creator>kris_vliegen</dc:creator>
      <dc:date>2014-05-20T13:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Do while with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639958#M234568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems that in your Lib-Table are more/other values as you expect - perhaps you need to extend your where-clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 13:32:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639958#M234568</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-05-20T13:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Do while with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639959#M234569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's working fine. I was linking some data in the table that wasn't matching.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 14:06:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639959#M234569</guid>
      <dc:creator>kris_vliegen</dc:creator>
      <dc:date>2014-05-20T14:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Do while with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639960#M234570</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;Everything was working fine.&lt;/P&gt;&lt;P&gt;But if I try to use it for another file I get some strange things...&lt;/P&gt;&lt;P&gt;Fot the file PBD he is filling one table "PBD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="59382" alt="ResultPBD1.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/59382_ResultPBD1.PNG.png" style="width: 620px; height: 315px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I do the same for the PBP file he is making 2 tables PBP and PBP-1&lt;/P&gt;&lt;P&gt;Why is he doing this&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="59381" alt="ResiltPBP1.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/59381_ResiltPBP1.PNG.png" style="width: 620px; height: 242px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this is the excel I'm using for both the scripts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="59385" alt="Excel.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/59385_Excel.PNG.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 10:21:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639960#M234570</guid>
      <dc:creator>kris_vliegen</dc:creator>
      <dc:date>2014-05-22T10:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: Do while with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639961#M234571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You used for your load within the loop the functionality that qv automatically concatenated tables which have the same fields. Is there any difference between the tables qv create a new table with a number-suffix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case you should check your data and if they are correct you need a forced concatenate:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for vFileNo ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; let vConcatenate = if($(vFileNo) = 1, '', 'concatenate(MyTable)');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyTable:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(vConcatenate)&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; SQL ....&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 14:10:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639961#M234571</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-05-22T14:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Do while with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639962#M234572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for you respond.&lt;/P&gt;&lt;P&gt;As I go and check the files there is indeed a difference between the files.&lt;/P&gt;&lt;P&gt;I&amp;nbsp; had also found a solution that was working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lib:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Boekjaar,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BoekLib&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[..\01 Table Files\Boekhoudjaren.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Blad1) ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PBPTemp:&lt;/P&gt;&lt;P&gt;load * inline [&lt;/P&gt;&lt;P&gt;Temp&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For vFileNo = 1 to NoOfRows('Lib')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET TMP = Peek('BoekLib',$(vFileNo)-1,'Lib');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vYear = Peek('Boekjaar',$(vFileNo)-1,'Lib');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let vFileName = 'S0678ADT.X62FIL' &amp;amp; '$(TMP)' &amp;amp; 'O.PBP';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Concatenate(PBPTemp)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PBPTemp:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '$(vYear)' as Year;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM $(vFileName) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Next vFileNo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table Lib;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;PBP:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BPKODE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BPINTR, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BPHOVE, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BPFILL, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year&lt;/P&gt;&lt;P&gt;Resident PBPTemp where Temp &amp;lt;&amp;gt; 1 ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table PBPTemp ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 14:21:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Do-while-with-variable/m-p/639962#M234572</guid>
      <dc:creator>kris_vliegen</dc:creator>
      <dc:date>2014-05-22T14:21:21Z</dc:date>
    </item>
  </channel>
</rss>

