Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
with a help from Marco Wedel (thread) I got the below script which requests data from websites in a loop until the data is loaded (due to web server issues a load ends up with no data so needs to be loaded again). Now I need to tune the script as described below.
Links:
LOAD * Inline [
Link
];
LET vNoOfLinks = NoOfRows('Links');
FOR i=0 to $(vNoOfLinks)-1;
LET vLink = Peek('Link',$(i),'Links');
LET vNoOfRowsRates = Alt(NoOfRows('Rates'),0);
DO
Rates:
LOAD
[@1:n] as Data
FROM $(vLink) (fix, utf8);
LOOP until NoOfRows('Rates') > $(vNoOfRowsRates);
NEXT;
Table 'Rates' consists of sets of data from Links. Each Link set (except the last one) should have exactly 10 records including '*increase*' string. However, due to web server issue, a load from a Link happens to return less than 10 records with the string. In such cases I need to load the data again from this very Link. The last Link set may return less than 10 records and that's ok.
Any idea how to play this scenario?
Regards,
Przemek
Anyone any idea, please?