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.
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
Hi Christopher,
if you add filelist, will that work?
for each a in filelist('586',591'......)
for each b in filelist('Prem.....)
Unfortunately that does not work, i get this syntax error:
Hi Christopher,
Try putting single quotes around your dollar sign expansions,
... comp_id = '$(a)'
...table is ['$(b)' League Table]
Regards
Andrew
PS C'mon the Gers!
ok, try then to add singlequote around Your variables, '$(a)' '$(b)' and delete filelist as mention above.
Nope that gives me this error:
I can however confirm that if i load it without the "filelist" syntax, and single quotes, it does load the first comp_id, and table, but not the following ones:
Ok, one step further, and all URL is exactly the same except comp_id number?
Yes that's correct.
ok, if you press OK, will it go on and try to load NEXT table. Click OK until Your loop is finished.
Maybe it will find some in Your interval.
It only found the first table: