<?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: Issue with an IF_THEN_ELSE loop in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Issue-with-an-IF-THEN-ELSE-loop/m-p/111646#M604966</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;okay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Jul 2018 12:15:06 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-07-20T12:15:06Z</dc:date>
    <item>
      <title>Issue with an IF_THEN_ELSE loop</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-an-IF-THEN-ELSE-loop/m-p/111643#M604963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am facing a strange issue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a loop, based on a small table loaded from excel that has six entries - inside the loop over this table,&lt;/P&gt;&lt;P&gt;there is an IF_THEN processing two of those entries, then there is an ELSEIF_THEN (the new part) processing one more of those values - because out of the four remaining ones, I have to treat one differently from the rest - and last there is an ELSE part processing the remaining three.&lt;/P&gt;&lt;P&gt;&amp;lt;=&amp;gt; For some reason, I am having trouble with the middle part, the ELSEIF_THEN, although the syntax is relatively easy.&lt;/P&gt;&lt;P&gt;I specify the specific value that should be in my counting variable (a string) for this part to be executed and by putting an EXIT before the loop and building a test_field in that little table I have made quite sure that that string really exists there and there are no hidden characters or other stuff.&lt;/P&gt;&lt;P&gt;I keep on trying, so it's kind of hard to say what I did last, but for some reason the loop seems to never enter that middle part. I have to look through the log exactly to find out what is or isn't done in every iteration.&lt;/P&gt;&lt;P&gt;Maybe someone can give me a hint on what I am doing wrong here?&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2018 12:01:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-an-IF-THEN-ELSE-loop/m-p/111643#M604963</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2018-07-20T12:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with an IF_THEN_ELSE loop</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-an-IF-THEN-ELSE-loop/m-p/111644#M604964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is your script look like?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2018 12:03:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-an-IF-THEN-ELSE-loop/m-p/111644#M604964</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-07-20T12:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with an IF_THEN_ELSE loop</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-an-IF-THEN-ELSE-loop/m-p/111645#M604965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying something different now: I am not putting in an ELSEIF_THEN, but instead, in the ELSE part I am building an IF() in the LOAD so that one field is loaded in a different manner for one out of those four values. Let's see if that works - for the moment I have deleted all five other values from that small table so that the loop should run only once and only that one value I am interested in should be processed. Once that works, I can restore the rest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: Seems to work - now I'll restore the remaining values and we'll see ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@ Sunny&lt;/P&gt;&lt;P&gt;My script used to look like this: There was a "FOR i=0 to NoOfRows('Partnerrolle'))-1" loop over that table - six entries.&lt;/P&gt;&lt;P&gt;As I said, the first IF_THEN part queried the variable made with PEEK() for two of those values;&lt;/P&gt;&lt;P&gt;The ELSEIF_THEN which I wanted to put in would have queried the variable for one more value (string, in quotes);&lt;/P&gt;&lt;P&gt;- The final ELSE part would have dealt with everything else without further specifying the three remaining values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2018 12:10:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-an-IF-THEN-ELSE-loop/m-p/111645#M604965</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2018-07-20T12:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with an IF_THEN_ELSE loop</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-an-IF-THEN-ELSE-loop/m-p/111646#M604966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;okay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2018 12:15:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-an-IF-THEN-ELSE-loop/m-p/111646#M604966</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-07-20T12:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with an IF_THEN_ELSE loop</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-an-IF-THEN-ELSE-loop/m-p/111647#M604967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your willingness to help, Sunny!&lt;/P&gt;&lt;P&gt;I would still like to know why it didn't work before - but that's not so critical.&lt;/P&gt;&lt;P&gt;That "secondary distinction" within the ELSE part seems to work.&lt;/P&gt;&lt;P&gt;Everything is nice and unique now as it should be. That makes working with the data a lot easier.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2018 12:30:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-an-IF-THEN-ELSE-loop/m-p/111647#M604967</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2018-07-20T12:30:19Z</dc:date>
    </item>
  </channel>
</rss>

