<?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 for...next cycle problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/for-next-cycle-problem/m-p/208140#M1208629</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Same result, unfortunately.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Jan 2010 10:04:46 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-01-07T10:04:46Z</dc:date>
    <item>
      <title>for...next cycle problem</title>
      <link>https://community.qlik.com/t5/QlikView/for-next-cycle-problem/m-p/208138#M1208627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, everybody.&lt;BR /&gt;&lt;BR /&gt;I have a table [URLS] with a field [URL], which contains the web address.&lt;BR /&gt;&lt;BR /&gt;I want to make a script, which would proceed through this table and load a certain data, for example, age information from web addresses in each field.&lt;BR /&gt;&lt;BR /&gt;I made script similar to this:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;set i = 0;&lt;BR /&gt;&lt;BR /&gt;for i = 0 to 1000&lt;BR /&gt;&lt;BR /&gt;let v_url = PEEK('URL',i,'URLS');&lt;BR /&gt;&lt;BR /&gt;[Data]:&lt;BR /&gt;&lt;BR /&gt;LOAD [Age:] as [Age]&lt;BR /&gt;FROM&lt;BR /&gt;$(v_url)&lt;BR /&gt;(html, unicode, embedded labels, table is @4);&lt;BR /&gt;&lt;BR /&gt;next i&lt;BR /&gt;&lt;BR /&gt;Script works only for the first iteration. After that it for some reason does not recreate v_url variable, it is empty and script fails.&lt;BR /&gt;&lt;BR /&gt;What am I doing wrong?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 09:46:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/for-next-cycle-problem/m-p/208138#M1208627</guid>
      <dc:creator />
      <dc:date>2010-01-07T09:46:15Z</dc:date>
    </item>
    <item>
      <title>for...next cycle problem</title>
      <link>https://community.qlik.com/t5/QlikView/for-next-cycle-problem/m-p/208139#M1208628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;LET v_url = PEEK('URL, $(i), 'URLS')&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 10:00:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/for-next-cycle-problem/m-p/208139#M1208628</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-01-07T10:00:25Z</dc:date>
    </item>
    <item>
      <title>for...next cycle problem</title>
      <link>https://community.qlik.com/t5/QlikView/for-next-cycle-problem/m-p/208140#M1208629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Same result, unfortunately.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 10:04:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/for-next-cycle-problem/m-p/208140#M1208629</guid>
      <dc:creator />
      <dc:date>2010-01-07T10:04:46Z</dc:date>
    </item>
    <item>
      <title>for...next cycle problem</title>
      <link>https://community.qlik.com/t5/QlikView/for-next-cycle-problem/m-p/208141#M1208630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First, sorry for my syntax errors in my previous post. Have you tried with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;SET v_url = PEEK('URL', $(i), 'URLS');&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;instead of LET?&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 10:37:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/for-next-cycle-problem/m-p/208141#M1208630</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-01-07T10:37:18Z</dc:date>
    </item>
    <item>
      <title>for...next cycle problem</title>
      <link>https://community.qlik.com/t5/QlikView/for-next-cycle-problem/m-p/208142#M1208631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To variable v_url in this case is assigned the string ' PEEK('URL', $(i), 'URLS')' itself, instead of the value from URL field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 11:33:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/for-next-cycle-problem/m-p/208142#M1208631</guid>
      <dc:creator />
      <dc:date>2010-01-07T11:33:10Z</dc:date>
    </item>
    <item>
      <title>for...next cycle problem</title>
      <link>https://community.qlik.com/t5/QlikView/for-next-cycle-problem/m-p/208143#M1208632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Indeed. That's what you assign, but then it will be evaluated via macro expansion with $(v_url). LET evaluates expression before being assigned. As far as I understand, you want to look for the name of the record. So thus should work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 11:45:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/for-next-cycle-problem/m-p/208143#M1208632</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-01-07T11:45:58Z</dc:date>
    </item>
    <item>
      <title>for...next cycle problem</title>
      <link>https://community.qlik.com/t5/QlikView/for-next-cycle-problem/m-p/208144#M1208633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, it did not evaluate. I received the error message, which notified that table PEEK can' t be opened (instead of web address there was PEEK('URL', $(i), 'URLS') string in FROM part of LOAD statement).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 11:51:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/for-next-cycle-problem/m-p/208144#M1208633</guid>
      <dc:creator />
      <dc:date>2010-01-07T11:51:51Z</dc:date>
    </item>
    <item>
      <title>for...next cycle problem</title>
      <link>https://community.qlik.com/t5/QlikView/for-next-cycle-problem/m-p/208145#M1208634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I've had problems using peek in situations like this. Can't really remember why but I've used fieldvalue instead successfully.&lt;BR /&gt;Something like this:&lt;BR /&gt;let noOfRows = noOfRows('URLS');&lt;BR /&gt;for i=1 to $(noOfRows)&lt;BR /&gt;let v_url = fieldvalue('URL', $(i));&lt;BR /&gt;LOAD [Age:] as [Age]&lt;BR /&gt;FROM&lt;BR /&gt;$(v_url)&lt;BR /&gt;(html, unicode, embedded labels, table is @4);&lt;BR /&gt;next&lt;BR /&gt;&lt;BR /&gt;Note that fieldvalue returns the value from the field itself, not the value on a specific row within the table.&lt;BR /&gt;If you have duplicate values in the URL field you won't get the expected result.&lt;BR /&gt;I've solved this by adding a rownumber to the URL field to create unique values and then remove the rownumber when reading from the url.&lt;BR /&gt;&lt;BR /&gt;/Fredrik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 12:09:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/for-next-cycle-problem/m-p/208145#M1208634</guid>
      <dc:creator />
      <dc:date>2010-01-07T12:09:54Z</dc:date>
    </item>
    <item>
      <title>for...next cycle problem</title>
      <link>https://community.qlik.com/t5/QlikView/for-next-cycle-problem/m-p/208146#M1208635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This worked, thanks!&lt;/P&gt;&lt;P&gt;Still, it was a strange problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 12:22:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/for-next-cycle-problem/m-p/208146#M1208635</guid>
      <dc:creator />
      <dc:date>2010-01-07T12:22:02Z</dc:date>
    </item>
  </channel>
</rss>

