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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Google Maps Reload issue - Producing Error Messages

I am receiveing these error messages when reloading my data (see below)

Script Line Error: for i=0 to

Script Line Error: let a=peek('FirstName',,'Table1')

Script Line Error: let b=peek('LastName',,'Table1')

Script Line Error: let c=peek(‘ProductSold’,,'Table1')

Script Line Error: let address=peek('City',,'Table1')

Script Line Error: next

Can anybody help?


3 Replies
Not applicable
Author

 

this is the script i am using

 

LOAD A,
    
B,
    
C,
    
DFROM

(
ooxml, no labels, table is Sheet1);
let noRows = NoOfRows('Table1')-1;
for i=0 to $(noRows)

    
let a=peek('FirstName',$(i),'Table1');
      
let b=peek('LastName',$(i),'Table1');
      
let c=peek(‘ProductSold’,$(i),'Table1');
    
let address=peek('City',$(i),'Table1');  
      

Data:
    
LOAD
     '$(a)'
as FirstName,
     '$(b)'
as LastName,
     '$(c)'
as ProductSold,
     '$(address)'
as Address,
    
subfield([Response/Placemark/Point/coordinates], ',' ,1) AS longitude,
    
subfield([Response/Placemark/Point/coordinates], ',' ,2) AS latitude
    
FROM [http://maps.google.com/maps/geo?q=$(address)&output=xml&oe=utf8&sensor=false&key=XXYYZZ] (XmlSimple, Table is [kml]);
next 

goldnejea8
Partner - Creator
Partner - Creator

LOAD A,
    
B,
    
C,
    
DFROM

(
ooxml, no labels, table is Sheet1);
let noRows = NoOfRows('Table1')-1;
for i=0 to $(noRows)

    
let a=peek('FirstName',$(i),'Table1');
      
let b=peek('LastName',$(i),'Table1');
      
let c=peek(‘ProductSold’,$(i),'Table1');
    
let address=peek('City',$(i),'Table1');

I plugged this into the script editor.  Looks like you need a space inbetween D and From in your first load statement.  Try this, do you get more errors?

goldnejea8
Partner - Creator
Partner - Creator

Also, for your NoOfRows() function, try explicitly naming the table you first load and referencing that in the NoOfRows() function.