<?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: Peek and for next script statement not working in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Peek-and-for-next-script-statement-not-working/m-p/1685011#M63799</link>
    <description>&lt;P&gt;...and the honest answer will be you can't. It will work however if you use the do while loop&lt;/P&gt;&lt;P&gt;e.g.&amp;nbsp;&lt;/P&gt;&lt;P&gt;set NoOfQvds=3;&lt;/P&gt;&lt;P&gt;let vNum=1&lt;/P&gt;&lt;P&gt;do while vNum &amp;lt; $NoOfQvds)&lt;/P&gt;&lt;P&gt;let vStart=Peek('QVD_Name',S(vNum),'Temp1');&lt;/P&gt;&lt;P&gt;load * from [$(vStart)](cvd);&lt;/P&gt;&lt;P&gt;let vNum=$(vNum)+1&lt;/P&gt;&lt;P&gt;loop&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Mar 2020 14:14:11 GMT</pubDate>
    <dc:creator>andrew_smith200</dc:creator>
    <dc:date>2020-03-16T14:14:11Z</dc:date>
    <item>
      <title>Peek and for next script statement not working</title>
      <link>https://community.qlik.com/t5/App-Development/Peek-and-for-next-script-statement-not-working/m-p/1684975#M63798</link>
      <description>&lt;P&gt;I am trying to load data from using the peek statement as follows:&lt;/P&gt;&lt;P&gt;Temp1:&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;First 3 Load * Resident Temp Order by QVD_Modified_Date desc; //Temp contains file paths with file names (QVD_NAME) and Modified dates to QVDs//&lt;/P&gt;&lt;P&gt;For vNum = 0 to 2 //tried 1 to 2 as well//&lt;/P&gt;&lt;P&gt;let vStart=Peek('QVD_NAME',$(vNum),'Temp1';&lt;/P&gt;&lt;P&gt;load * from [$(vStart)](qvd);&lt;/P&gt;&lt;P&gt;Next&lt;/P&gt;&lt;P&gt;Peek just doesn't want to recognise the variable $(vNum). I have tried '($vNum)', '$vNum', vNum, $vNum, but nothing seems to work yet if I use&amp;nbsp;let vStart=Peek('QVD_NAME',0,'Temp1' then it works perfectly. Just doesn't seem to like variable as the row - anyone have any ideas?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 18:56:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Peek-and-for-next-script-statement-not-working/m-p/1684975#M63798</guid>
      <dc:creator>andrew_smith200</dc:creator>
      <dc:date>2024-11-16T18:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: Peek and for next script statement not working</title>
      <link>https://community.qlik.com/t5/App-Development/Peek-and-for-next-script-statement-not-working/m-p/1685011#M63799</link>
      <description>&lt;P&gt;...and the honest answer will be you can't. It will work however if you use the do while loop&lt;/P&gt;&lt;P&gt;e.g.&amp;nbsp;&lt;/P&gt;&lt;P&gt;set NoOfQvds=3;&lt;/P&gt;&lt;P&gt;let vNum=1&lt;/P&gt;&lt;P&gt;do while vNum &amp;lt; $NoOfQvds)&lt;/P&gt;&lt;P&gt;let vStart=Peek('QVD_Name',S(vNum),'Temp1');&lt;/P&gt;&lt;P&gt;load * from [$(vStart)](cvd);&lt;/P&gt;&lt;P&gt;let vNum=$(vNum)+1&lt;/P&gt;&lt;P&gt;loop&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 14:14:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Peek-and-for-next-script-statement-not-working/m-p/1685011#M63799</guid>
      <dc:creator>andrew_smith200</dc:creator>
      <dc:date>2020-03-16T14:14:11Z</dc:date>
    </item>
  </channel>
</rss>

