Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
francisvandergr
Partner - Creator II
Partner - Creator II

Fill in page in script

Here below i have a script from an internet file. Below i load page 1 to 2

After that i wanna load 2- 3

then i wanna load page 3-4

till 1000


Wo can expand this script so it works  with a loop maybe and a variable ?

LOAD @1 ,

     @2 ,

     @3 ,

     @4 ,

     @5 FROM

[http://www.internetpage/page.php?ZuidHollandZuid=1&Page=1&AutoRefresh=uit&Page=2]

(html, codepage is 1252, no labels, table is @3);

concatenate

LOAD @1 ,

     @2 ,

     @3 ,

     @4 ,

     @5 FROM

[http://www.internetpage/page.php?ZuidHollandZuid=1&Page=2&AutoRefresh=uit&Page=3]

(html, codepage is 1252, no labels, table is @3);

till 1000

1 Solution

Accepted Solutions
prashantbaste
Partner - Creator II
Partner - Creator II

Hi Francis vd Grijn

Try below code -

==================================

For var1= 2 to 1000

     LET var2= ($(var1)-1)

LOAD @1 ,

     @2 ,

     @3 ,

     @4 ,

     @5 FROM

[http://www.internetpage/page.php?ZuidHollandZuid=1&Page=$(var2)&AutoRefresh=uit&Page=$(var1)]

(html, codepage is 1252, no labels, table is @3);

Next var1;

==================================

Let me know if this is helpful to you?

--

Regards,

Prashant P Baste

View solution in original post

2 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Hi Francis,

try like this:

FOR i = 1 TO 1000 // or 999 if you will not exceed 1000

  Data:

  LOAD @1 ,

       @2 ,

       @3 ,

       @4 ,

       @5

  FROM [http://www.internetpage/page.php?ZuidHollandZuid=1&Page=$(i)&AutoRefresh=uit&Page=$(=$(i)+1)]

(html, codepage is 1252, no labels, table is @3);

NEXT

Sorry for the line breaks in the FROM specification. Keep the parts together as in your example.

Note: using a single named table over and over with the same LOAD column list will autoconcatenate all subsequent loads.

Peter

prashantbaste
Partner - Creator II
Partner - Creator II

Hi Francis vd Grijn

Try below code -

==================================

For var1= 2 to 1000

     LET var2= ($(var1)-1)

LOAD @1 ,

     @2 ,

     @3 ,

     @4 ,

     @5 FROM

[http://www.internetpage/page.php?ZuidHollandZuid=1&Page=$(var2)&AutoRefresh=uit&Page=$(var1)]

(html, codepage is 1252, no labels, table is @3);

Next var1;

==================================

Let me know if this is helpful to you?

--

Regards,

Prashant P Baste