Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
I am trying to use a nested for loop in this manner:
But i keep getting this error:
Your help will be greatly appreciated.
Regards,
Christopher.
See my reply at 03 Nov 2017 2:15 PM
It might be worth you troubleshooting this with the script?
I actually did a test, if I switch order of Next it Works. if a keep it Next a Next b it fails as in Your case.
for each a in 586,591,600
for each b in 'test1', 'test2', 'test3'
next b
next a
That works, but i still get those errors in between the other tables loading:
Tables << Premier League 17/18 League table 20 Lines fetched
Cannot locate table in HTML file
Cannot locate table in HTML file
Cannot locate table in HTML file
Cannot locate table in HTML file
Cannot locate table in HTML file
Cannot locate table in HTML file
Cannot locate table in HTML file
Tables << Bundesliga 17/18 League table 38 Lines fetched
Cannot locate table in HTML file.....ect
Hi Christopher
This was a tricky one, finally I find a solution which a hope fits Your requierment.
fieldlist:
Load * Inline [
Field, http
"Premier League 17/18 League table", 586
"Bundesliga 17/18 League table", 591
"La Liga 17/18 League table", 600
"French Ligue 1 17/18 League table", 594
"Eredivisie 17/18 League table", 599
"Serie A 2017/18 League table", 593
"Scottish Premiership 17/18 League table", 590
];
for i= 1 to NoOfRows('fieldlist')-1 //count the rows in table fieldlist
let a =FieldValue('http',$(i));
let b =FieldValue('Field',$(i));
tables:
LOAD
# as [Pos],
Clubs as [Team],
P,
W,
D,
L,
F,
A ,
GD,
Points as [Pts],
'$(b)' as [Table Type]
FROM
[https://www.statbunker.com/competitions/LeagueTable?comp_id=$(a)]
(html, codepage is 1252, embedded labels, table is [$(b)])
;
next i
Amazing! That works perfectly. Thanks for all the help
Hi,
just one more, change this row, should not have -1
for i= 1 to NoOfRows('fieldlist') //count the rows in table fieldlist
Great, sporttables is very important Things I'm a big sportfan.
Glad to hear. I have built a cricket and rugby app as well. Send me your email address and i will send you a link to my Qlik Cloud account so that you may view it. Will upload the football one as soon as i am done with it