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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
prahlad_infy
Partner - Creator II
Partner - Creator II

How loading web data automatically until its last page ?

Hello Sirs ,

Let say there is web page hypothetically

http://teams/‌abc/Page1

http://teams/‌abc/Page31

http://teams/‌abc/Page61

.

.

.

.

http://teams/‌abc/PageN

How to load data to from page 1 to page N ....

Important : We do not know the value of N as daily new pages gets increased.

I using below code :

For i = 1 to 1000

set vPage1part= ' http://teams/‌abc/Page' ;

let vStartPage = $(i) ;

X:

Load

a,

b,

c,

d

From

$(vPage1part)&$(vStartPage) ;

Trace $(i) ;

let vStartPage= $(i) + 30 ;

STORE X into ..............\X.qvd ;

Next

Thank you

3 Replies
rubenmarin

Hi Prahlad, I don't know if there is any other way if you don0t previously know the value N, maybe using ErrorMode=0 and checking ScriptErrorCount to know where to stop.

https://help.qlik.com/es-ES/qlikview/November2017/Subsystems/Client/Content/Scripting/ErrorVariables...

prahlad_infy
Partner - Creator II
Partner - Creator II
Author

Hello Ruban ,

Can you please share the code ? I am new and not totally sure .

rubenmarin

Do a copy of your current state, I haven't tested it:

Before your bucle starts add, note that after this sentence script errors won't stop the execution of script

SET ErrorMode=0;

Inside the bucle, after the load add:

EXIT FOR WHEN ScriptErrorCount>0;

After the bucle restore ErrorMode

SET ErrorMode=1;