<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Help with skipping an i in a for loop (or moving to next i) with If statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-skipping-an-i-in-a-for-loop-or-moving-to-next-i-with/m-p/1394822#M423573</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Let noRows = NoOfRows('Facts')-1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-family: inherit; font-size: 10pt; font-style: inherit; font-weight: inherit;"&gt;for i=1 to $(noRows)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;//let a=peek('Pt_FNAME',$(i),'Facts');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;//let b=peek('Pt_LNAME',$(i),'Facts');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;//let c=peek(‘ProductSold’,$(i),'Facts');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;let address=peek('City',$(i),'Facts');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #0000ff;"&gt;If Not isnull(address) Then&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit; font-style: inherit; font-weight: inherit; font-size: 10pt;"&gt;GeocodeResponse:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;LOAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;status,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;//'$(a)' as Pt_FNAME,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;//'$(b)' as Pt_LNAME,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;//'$(c)' as ProductSold,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;'$(address)' as City,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;([result/geometry/location/lat]) as latitude,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ([result/geometry/location/lng]) as longitude&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;FROM [&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://maps.googleapis.com/maps/api/geocode/xml?address=$(address)&amp;amp;sensor=false" rel="nofollow" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3778c7;" target="_blank"&gt;http://maps.googleapis.com/maps/api/geocode/xml?address=$(address)&amp;amp;sensor=false&lt;/A&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;] (XmlSimple, Table is [GeocodeResponse]);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff;"&gt;ELSE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff;"&gt;ENDIF&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;next i;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Sep 2017 04:10:47 GMT</pubDate>
    <dc:creator>tamilarasu</dc:creator>
    <dc:date>2017-09-12T04:10:47Z</dc:date>
    <item>
      <title>Help with skipping an i in a for loop (or moving to next i) with If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-skipping-an-i-in-a-for-loop-or-moving-to-next-i-with/m-p/1394821#M423572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am trying to integrate to Google Maps. Whilst I've managed to do that, I need to handle records where there is no address. Some records do not have an address as I've mashed all the FACTS into one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I am doing is peeking inside a field, and, if it's null, I want to move to the next i in the for loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there's an address, then move to the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've mucked around with a few options but none seem to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Be gentle, I'm just a beginner.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's what I have: what I end up with is a GMAP call that fails as address is often null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;
&lt;P&gt;let noRows = NoOfRows('Facts')-1;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;for i=1 to $(noRows)&lt;/P&gt;
&lt;P&gt;//let a=peek('Pt_FNAME',$(i),'Facts');&lt;/P&gt;
&lt;P&gt;//let b=peek('Pt_LNAME',$(i),'Facts');&lt;/P&gt;
&lt;P&gt;//let c=peek(‘ProductSold’,$(i),'Facts');&lt;/P&gt;
&lt;P&gt;let address=peek('City',$(i),'Facts');&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;GeocodeResponse:&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;status,&lt;/P&gt;
&lt;P&gt;//'$(a)' as Pt_FNAME,&lt;/P&gt;
&lt;P&gt;//'$(b)' as Pt_LNAME,&lt;/P&gt;
&lt;P&gt;//'$(c)' as ProductSold,&lt;/P&gt;
&lt;P&gt;'$(address)' as City,&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;([result/geometry/location/lat]) as latitude,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ([result/geometry/location/lng]) as longitude&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;FROM [&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://maps.googleapis.com/maps/api/geocode/xml?address=$(address)&amp;amp;sensor=false" rel="nofollow" target="_blank"&gt;http://maps.googleapis.com/maps/api/geocode/xml?address=$(address)&amp;amp;sensor=false&lt;/A&gt;&lt;SPAN&gt;] (XmlSimple, Table is [GeocodeResponse]);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;next i;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;Here's what I have come up with in the for loop, but I get a script error. Basically, the logic is: if address is null, try the next i, if it's not null, carry on to the GeocodeResponse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;let noRows = NoOfRows('Facts')-1;

for i=1 to $(noRows)

//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;let a=peek('Pt_FNAME',$(i),'Facts');
//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; let b=peek('Pt_LNAME',$(i),'Facts');
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //let c=peek(‘ProductSold’,$(i),'Facts');
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;let address=peek('City',$(i),'Facts');
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if IsNull ($address)) Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit FOR
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//also have tried Next i;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Else 
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2017 03:51:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-skipping-an-i-in-a-for-loop-or-moving-to-next-i-with/m-p/1394821#M423572</guid>
      <dc:creator>timmarsh</dc:creator>
      <dc:date>2017-09-12T03:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: Help with skipping an i in a for loop (or moving to next i) with If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-skipping-an-i-in-a-for-loop-or-moving-to-next-i-with/m-p/1394822#M423573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Let noRows = NoOfRows('Facts')-1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-family: inherit; font-size: 10pt; font-style: inherit; font-weight: inherit;"&gt;for i=1 to $(noRows)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;//let a=peek('Pt_FNAME',$(i),'Facts');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;//let b=peek('Pt_LNAME',$(i),'Facts');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;//let c=peek(‘ProductSold’,$(i),'Facts');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;let address=peek('City',$(i),'Facts');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #0000ff;"&gt;If Not isnull(address) Then&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit; font-style: inherit; font-weight: inherit; font-size: 10pt;"&gt;GeocodeResponse:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;LOAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;status,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;//'$(a)' as Pt_FNAME,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;//'$(b)' as Pt_LNAME,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;//'$(c)' as ProductSold,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;'$(address)' as City,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;([result/geometry/location/lat]) as latitude,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ([result/geometry/location/lng]) as longitude&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;FROM [&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://maps.googleapis.com/maps/api/geocode/xml?address=$(address)&amp;amp;sensor=false" rel="nofollow" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3778c7;" target="_blank"&gt;http://maps.googleapis.com/maps/api/geocode/xml?address=$(address)&amp;amp;sensor=false&lt;/A&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;] (XmlSimple, Table is [GeocodeResponse]);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff;"&gt;ELSE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff;"&gt;ENDIF&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;next i;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2017 04:10:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-skipping-an-i-in-a-for-loop-or-moving-to-next-i-with/m-p/1394822#M423573</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2017-09-12T04:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: Help with skipping an i in a for loop (or moving to next i) with If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-skipping-an-i-in-a-for-loop-or-moving-to-next-i-with/m-p/1394823#M423574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Winner, winner, chicken dinner. (Except if you're plant powered!)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so very much Tamil!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And now, onto the troublesome graph plotting!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2017 04:59:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-skipping-an-i-in-a-for-loop-or-moving-to-next-i-with/m-p/1394823#M423574</guid>
      <dc:creator>timmarsh</dc:creator>
      <dc:date>2017-09-12T04:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Help with skipping an i in a for loop (or moving to next i) with If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-skipping-an-i-in-a-for-loop-or-moving-to-next-i-with/m-p/1394824#M423575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ha ha ha. Good luck and have a happy day Tim! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2017 05:21:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-skipping-an-i-in-a-for-loop-or-moving-to-next-i-with/m-p/1394824#M423575</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2017-09-12T05:21:48Z</dc:date>
    </item>
  </channel>
</rss>

