<?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 Build Table with API in a Loop in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Build-Table-with-API-in-a-Loop/m-p/2057498#M86851</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;I am very close to getting this running, but at the moment my code leaves me with the required number of rows, but the same 500 or so rows repeated over and over.&lt;/P&gt;
&lt;P&gt;Any pointer would be much appreciated.&lt;/P&gt;
&lt;P&gt;Here's my code:&lt;/P&gt;
&lt;P&gt;// recTotal already found by a previous query = 111,532;&lt;/P&gt;
&lt;P&gt;Let startAt = 0;&lt;BR /&gt;Let pageSize = 500;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;[ABS_Main]:&lt;BR /&gt;LOAD [@row.id],&lt;BR /&gt;[ID-ABS],&lt;BR /&gt;[Record Owner]&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;FOR startAt = 0 TO recTotal STEP pageSize&lt;BR /&gt;&lt;BR /&gt;Concatenate&lt;/P&gt;
&lt;P&gt;SQL SELECT &lt;BR /&gt;"@row.id",&lt;BR /&gt;"ID-ABS",&lt;BR /&gt;"Record Owner"&lt;BR /&gt;FROM JSON (wrap on) "root"&lt;BR /&gt;WITH CONNECTION(&lt;/P&gt;
&lt;P&gt;URL "&lt;A href="https://blah/blah/blah/select.json" target="_blank" rel="noopener"&gt;https://blah/blah/blah/select.json&lt;/A&gt;",&lt;BR /&gt;QUERY "offset" "$(startAt)",&lt;BR /&gt;QUERY "limit" "$(pageSize)"&lt;/P&gt;
&lt;P&gt;);&lt;/P&gt;
&lt;P&gt;NEXT startAt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Apr 2023 13:52:12 GMT</pubDate>
    <dc:creator>Jim_O</dc:creator>
    <dc:date>2023-04-05T13:52:12Z</dc:date>
    <item>
      <title>Build Table with API in a Loop</title>
      <link>https://community.qlik.com/t5/App-Development/Build-Table-with-API-in-a-Loop/m-p/2057498#M86851</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;I am very close to getting this running, but at the moment my code leaves me with the required number of rows, but the same 500 or so rows repeated over and over.&lt;/P&gt;
&lt;P&gt;Any pointer would be much appreciated.&lt;/P&gt;
&lt;P&gt;Here's my code:&lt;/P&gt;
&lt;P&gt;// recTotal already found by a previous query = 111,532;&lt;/P&gt;
&lt;P&gt;Let startAt = 0;&lt;BR /&gt;Let pageSize = 500;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;[ABS_Main]:&lt;BR /&gt;LOAD [@row.id],&lt;BR /&gt;[ID-ABS],&lt;BR /&gt;[Record Owner]&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;FOR startAt = 0 TO recTotal STEP pageSize&lt;BR /&gt;&lt;BR /&gt;Concatenate&lt;/P&gt;
&lt;P&gt;SQL SELECT &lt;BR /&gt;"@row.id",&lt;BR /&gt;"ID-ABS",&lt;BR /&gt;"Record Owner"&lt;BR /&gt;FROM JSON (wrap on) "root"&lt;BR /&gt;WITH CONNECTION(&lt;/P&gt;
&lt;P&gt;URL "&lt;A href="https://blah/blah/blah/select.json" target="_blank" rel="noopener"&gt;https://blah/blah/blah/select.json&lt;/A&gt;",&lt;BR /&gt;QUERY "offset" "$(startAt)",&lt;BR /&gt;QUERY "limit" "$(pageSize)"&lt;/P&gt;
&lt;P&gt;);&lt;/P&gt;
&lt;P&gt;NEXT startAt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 13:52:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Build-Table-with-API-in-a-Loop/m-p/2057498#M86851</guid>
      <dc:creator>Jim_O</dc:creator>
      <dc:date>2023-04-05T13:52:12Z</dc:date>
    </item>
  </channel>
</rss>

