Skip to main content
Announcements
Product Release Webinar: Qlik Insider airing December 6! REGISTER TODAY!
cancel
Showing results for 
Search instead for 
Did you mean: 
mferrarini88
Contributor II
Contributor II

Peek returns empty value - get error

I have a table called INIZIATI wich contains a field called IndirizzoCliente.

After that I have this code

 

DataGM:
LOAD * INLINE
[Address, latitude, longitude
'', 0,0
];

let noRows =  NoOfRows('INIZIATI')-1;
for i=0 to $(noRows) 
LET ind = peek('IndirizzoCliente', '$(i)', 'INIZIATI');
if not isnull($(ind)) AND len($(ind)>0) then
CONCATENATE DataGM:
LOAD
    '$(ind)' as Address1,
    [result/geometry/location/lat] as latitude,
    [result/geometry/location/lng] as longitude
FROM [<a href="https://maps.googleapis.com/maps/api/geocode/xml?address=$(C)&key=$(vKey)&sensor=false" target="_blank">https://maps.googleapis.com/maps/api/geocode/xml?address=$(C)&key=$(vKey)&sensor=false</a>] (XmlSimple, Table is [GeocodeResponse]);
end if
NEXT i;

 

(The a href s not in my code, is displayed when I pasted my code in this website and I can't remove it.)

It seems that $c is completely empty because I'm getting this error:

 

clipboard_image_2.png

 
1 Solution

Accepted Solutions
Vegar
MVP
MVP

Try this:

isnull('$(ind)') AND len('$(ind)'>0)

View solution in original post

1 Reply
Vegar
MVP
MVP

Try this:

isnull('$(ind)') AND len('$(ind)'>0)