<?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: To always read the last available table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/To-always-read-the-last-available-table/m-p/1797125#M1211359</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.qlik.com/t5/user/viewprofilepage/user-id/114998" target="_blank"&gt;@brunolelli87&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The script below should pull the max table available for the weblink. The first part up until *** End **** checks what is the max page available and then stores it into a variable maxPage. Hope this helps.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For each company in $(companies)&lt;/P&gt;&lt;P&gt;// ****** Script to check max page available ******************&lt;BR /&gt;let searchMaxTable = True();&lt;BR /&gt;let page = 1;&lt;BR /&gt;&lt;BR /&gt;set errormode = 0;&lt;BR /&gt;&lt;BR /&gt;do while searchMaxTable&lt;BR /&gt;&lt;BR /&gt;Temp:&lt;BR /&gt;first 1&lt;BR /&gt;LOAD *&lt;BR /&gt;FROM&lt;BR /&gt;[&lt;A href="https://www.flightera.net/en/airline/$(companies)?orderby=reg&amp;amp;direction=asc&amp;amp;offset=800#plane_list" target="_blank"&gt;https://www.flightera.net/en/airline/$(companies)?orderby=reg&amp;amp;direction=asc&amp;amp;offset=800#plane_list&lt;/A&gt;]&lt;BR /&gt;(html, utf8, UserAgent is 'Mozilla/5.0', embedded labels, table is @$(page));&lt;BR /&gt;&lt;BR /&gt;drop table Temp;&lt;BR /&gt;&lt;BR /&gt;if $(ScriptErrorCount) &amp;gt; 0 then&lt;BR /&gt;&lt;BR /&gt;let maxPage = $(page) - 1;&lt;BR /&gt;set errormode = 1;&lt;BR /&gt;searchMaxTable = false();&lt;BR /&gt;&lt;BR /&gt;else&lt;BR /&gt;let page = $(page)+1;&lt;BR /&gt;&lt;BR /&gt;ENDIF&lt;BR /&gt;&lt;BR /&gt;loop&lt;BR /&gt;// ****** End ****************************************&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LOAD *, '$(companies)' as NCIA&lt;BR /&gt;FROM&lt;BR /&gt;[&lt;A href="https://www.flightera.net/en/airline/$(companies)?orderby=reg&amp;amp;direction=asc&amp;amp;offset=800#plane_list" target="_blank"&gt;https://www.flightera.net/en/airline/$(companies)?orderby=reg&amp;amp;direction=asc&amp;amp;offset=800#plane_list&lt;/A&gt;]&lt;BR /&gt;(html, utf8, UserAgent is 'Mozilla/5.0', no labels, table is @$(maxPage));&lt;/P&gt;&lt;P&gt;Next companies&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Apr 2021 09:28:09 GMT</pubDate>
    <dc:creator>stefan152</dc:creator>
    <dc:date>2021-04-06T09:28:09Z</dc:date>
    <item>
      <title>To always read the last available table</title>
      <link>https://community.qlik.com/t5/QlikView/To-always-read-the-last-available-table/m-p/1796795#M1211335</link>
      <description>&lt;P&gt;Hello guys,&lt;/P&gt;&lt;P&gt;I'm trying to read some tables from a website, but sometimes the table I'm looking for is the table @5, sometimes the table 2, or even 3... The fact is that I have to read always the last available table.&lt;/P&gt;&lt;P&gt;How can I do that?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;For each company in $(companies)

	LOAD *, '$(companies)' as NCIA
	FROM
	[https://www.flightera.net/en/airline/$(companies)?orderby=reg&amp;amp;direction=asc&amp;amp;offset=800#plane_list]
	(html, utf8, UserAgent is 'Mozilla/5.0', no labels, table is @5);

Next companies&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was trying to use something like ... no labels, table is max(table));... por it's not working&lt;/P&gt;&lt;P&gt;Is there any way of doing that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you guys&lt;/P&gt;</description>
      <pubDate>Mon, 05 Apr 2021 06:07:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-always-read-the-last-available-table/m-p/1796795#M1211335</guid>
      <dc:creator>brunolelli87</dc:creator>
      <dc:date>2021-04-05T06:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: To always read the last available table</title>
      <link>https://community.qlik.com/t5/QlikView/To-always-read-the-last-available-table/m-p/1797107#M1211357</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/114998"&gt;@brunolelli87&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Could you provide more information? Which table do you want? For example, when I chose for KLM Cityhopper. &lt;A href="https://www.flightera.net/en/airline/KLM+Cityhopper?orderby=reg&amp;amp;direction=asc&amp;amp;offset=800#plane_list" target="_blank"&gt;https://www.flightera.net/en/airline/KLM+Cityhopper?orderby=reg&amp;amp;direction=asc&amp;amp;offset=800#plane_list&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards Eddie&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 08:46:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-always-read-the-last-available-table/m-p/1797107#M1211357</guid>
      <dc:creator>eddie_wagt</dc:creator>
      <dc:date>2021-04-06T08:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: To always read the last available table</title>
      <link>https://community.qlik.com/t5/QlikView/To-always-read-the-last-available-table/m-p/1797125#M1211359</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.qlik.com/t5/user/viewprofilepage/user-id/114998" target="_blank"&gt;@brunolelli87&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The script below should pull the max table available for the weblink. The first part up until *** End **** checks what is the max page available and then stores it into a variable maxPage. Hope this helps.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For each company in $(companies)&lt;/P&gt;&lt;P&gt;// ****** Script to check max page available ******************&lt;BR /&gt;let searchMaxTable = True();&lt;BR /&gt;let page = 1;&lt;BR /&gt;&lt;BR /&gt;set errormode = 0;&lt;BR /&gt;&lt;BR /&gt;do while searchMaxTable&lt;BR /&gt;&lt;BR /&gt;Temp:&lt;BR /&gt;first 1&lt;BR /&gt;LOAD *&lt;BR /&gt;FROM&lt;BR /&gt;[&lt;A href="https://www.flightera.net/en/airline/$(companies)?orderby=reg&amp;amp;direction=asc&amp;amp;offset=800#plane_list" target="_blank"&gt;https://www.flightera.net/en/airline/$(companies)?orderby=reg&amp;amp;direction=asc&amp;amp;offset=800#plane_list&lt;/A&gt;]&lt;BR /&gt;(html, utf8, UserAgent is 'Mozilla/5.0', embedded labels, table is @$(page));&lt;BR /&gt;&lt;BR /&gt;drop table Temp;&lt;BR /&gt;&lt;BR /&gt;if $(ScriptErrorCount) &amp;gt; 0 then&lt;BR /&gt;&lt;BR /&gt;let maxPage = $(page) - 1;&lt;BR /&gt;set errormode = 1;&lt;BR /&gt;searchMaxTable = false();&lt;BR /&gt;&lt;BR /&gt;else&lt;BR /&gt;let page = $(page)+1;&lt;BR /&gt;&lt;BR /&gt;ENDIF&lt;BR /&gt;&lt;BR /&gt;loop&lt;BR /&gt;// ****** End ****************************************&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LOAD *, '$(companies)' as NCIA&lt;BR /&gt;FROM&lt;BR /&gt;[&lt;A href="https://www.flightera.net/en/airline/$(companies)?orderby=reg&amp;amp;direction=asc&amp;amp;offset=800#plane_list" target="_blank"&gt;https://www.flightera.net/en/airline/$(companies)?orderby=reg&amp;amp;direction=asc&amp;amp;offset=800#plane_list&lt;/A&gt;]&lt;BR /&gt;(html, utf8, UserAgent is 'Mozilla/5.0', no labels, table is @$(maxPage));&lt;/P&gt;&lt;P&gt;Next companies&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 09:28:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-always-read-the-last-available-table/m-p/1797125#M1211359</guid>
      <dc:creator>stefan152</dc:creator>
      <dc:date>2021-04-06T09:28:09Z</dc:date>
    </item>
  </channel>
</rss>

