<?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: Loop values from a table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loop-values-from-a-table/m-p/1769090#M591601</link>
    <description>&lt;P&gt;it is interpreting nrow as a field try it with $(nRow)&lt;/P&gt;&lt;P&gt;also you should stay away from loops if you can find a way to use table operations.&amp;nbsp; that is IF&lt;/P&gt;</description>
    <pubDate>Wed, 16 Dec 2020 20:37:02 GMT</pubDate>
    <dc:creator>edwin</dc:creator>
    <dc:date>2020-12-16T20:37:02Z</dc:date>
    <item>
      <title>Loop values from a table</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-values-from-a-table/m-p/1769075#M591600</link>
      <description>&lt;P&gt;Hello everybody, I'm just starting on Qlik and got caught up in a little mess.&lt;BR /&gt;So, I use a REST connector to get IDs that I will later use in an API request.&lt;BR /&gt;&lt;BR /&gt;It looks something like this:&lt;BR /&gt;&lt;BR /&gt;LIB CONNECT TO 'CC_ID';&lt;/P&gt;&lt;P&gt;RestConnectorMasterTable:&lt;BR /&gt;SQL SELECT&lt;BR /&gt;"codigo",&lt;BR /&gt;"mensagem",&lt;BR /&gt;"erros",&lt;BR /&gt;"__KEY_root",&lt;BR /&gt;(SELECT&lt;BR /&gt;"Id",&lt;BR /&gt;"Nome",&lt;BR /&gt;"__FK_dados"&lt;BR /&gt;FROM "dados" FK "__FK_dados")&lt;BR /&gt;FROM JSON (wrap on) "root" PK "__KEY_root";&lt;/P&gt;&lt;P&gt;[dados]:&lt;BR /&gt;LOAD [Id]&lt;BR /&gt;RESIDENT RestConnectorMasterTable;&lt;/P&gt;&lt;P&gt;DROP TABLE&amp;nbsp;RestConnectorMasterTable;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I'd like to loop each one of the values from the [dados] table as a query parameter on the following request. It has to be one by one.&lt;/P&gt;&lt;P&gt;//somewebsite.com/api/Id=$(vId)&lt;/P&gt;&lt;P&gt;So that I have on the first loop the vId = 1st value of the [Id] field from the [dados] table and so on&lt;/P&gt;&lt;P&gt;I tried using something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LET nRows = Noofrows([dados])&lt;BR /&gt;&lt;BR /&gt;FOR i = 1 to nRows&lt;/P&gt;&lt;P&gt;Let vId = peek([Id], i, [dados]);&lt;/P&gt;&lt;P&gt;Next&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I keep getting an error message from the "FOR i = 1 to nRows".&amp;nbsp; Is there another way of doing what I want? Please, would someone shed some light on this issue.&lt;BR /&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 17:41:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-values-from-a-table/m-p/1769075#M591600</guid>
      <dc:creator>bjagrelli</dc:creator>
      <dc:date>2024-11-16T17:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Loop values from a table</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-values-from-a-table/m-p/1769090#M591601</link>
      <description>&lt;P&gt;it is interpreting nrow as a field try it with $(nRow)&lt;/P&gt;&lt;P&gt;also you should stay away from loops if you can find a way to use table operations.&amp;nbsp; that is IF&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 20:37:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-values-from-a-table/m-p/1769090#M591601</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-12-16T20:37:02Z</dc:date>
    </item>
  </channel>
</rss>

