<?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 DO LOOP STATEMENT PROBLEM in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/DO-LOOP-STATEMENT-PROBLEM/m-p/233399#M84936</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi community.&lt;/P&gt;&lt;P&gt;Please i have a problem with a do loop statement.&lt;/P&gt;&lt;P&gt;This is mi statement:&lt;/P&gt;&lt;P style="font-weight: bold"&gt;LET i = 1;&lt;BR /&gt;SET ch = "=";&lt;BR /&gt;&lt;BR /&gt;DO while NOT IsNull(FieldValue('RV', i))&lt;BR /&gt;&lt;BR /&gt; IF(i&amp;lt;&amp;gt;1, $(ch)&amp;amp;"+");&lt;BR /&gt;&lt;BR /&gt; $(ch) = $(ch) &amp;amp; 'SUM({$&amp;lt;COMPTE={' &amp;amp; FieldValue('RV', i) &amp;amp; '*}&amp;gt;} DEBIT_CLO)';&lt;BR /&gt;&lt;BR /&gt; i = i + 1;&lt;BR /&gt;&lt;BR /&gt; LOOP&lt;/P&gt;&lt;P&gt;When i reload my qlikview application, this error is displayed :&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Error in expression:&lt;BR /&gt;')' expected&lt;BR /&gt;IF(i&amp;lt;&amp;gt;1, =&amp;amp;"+")&lt;/P&gt;&lt;P&gt;Please i want your help.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Dec 2010 15:35:46 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-12-27T15:35:46Z</dc:date>
    <item>
      <title>DO LOOP STATEMENT PROBLEM</title>
      <link>https://community.qlik.com/t5/QlikView/DO-LOOP-STATEMENT-PROBLEM/m-p/233399#M84936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi community.&lt;/P&gt;&lt;P&gt;Please i have a problem with a do loop statement.&lt;/P&gt;&lt;P&gt;This is mi statement:&lt;/P&gt;&lt;P style="font-weight: bold"&gt;LET i = 1;&lt;BR /&gt;SET ch = "=";&lt;BR /&gt;&lt;BR /&gt;DO while NOT IsNull(FieldValue('RV', i))&lt;BR /&gt;&lt;BR /&gt; IF(i&amp;lt;&amp;gt;1, $(ch)&amp;amp;"+");&lt;BR /&gt;&lt;BR /&gt; $(ch) = $(ch) &amp;amp; 'SUM({$&amp;lt;COMPTE={' &amp;amp; FieldValue('RV', i) &amp;amp; '*}&amp;gt;} DEBIT_CLO)';&lt;BR /&gt;&lt;BR /&gt; i = i + 1;&lt;BR /&gt;&lt;BR /&gt; LOOP&lt;/P&gt;&lt;P&gt;When i reload my qlikview application, this error is displayed :&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Error in expression:&lt;BR /&gt;')' expected&lt;BR /&gt;IF(i&amp;lt;&amp;gt;1, =&amp;amp;"+")&lt;/P&gt;&lt;P&gt;Please i want your help.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 15:35:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DO-LOOP-STATEMENT-PROBLEM/m-p/233399#M84936</guid>
      <dc:creator />
      <dc:date>2010-12-27T15:35:46Z</dc:date>
    </item>
    <item>
      <title>SV:DO LOOP STATEMENT PROBLEM</title>
      <link>https://community.qlik.com/t5/QlikView/DO-LOOP-STATEMENT-PROBLEM/m-p/233400#M84937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't understand the purpose of the first line inside your loop:&lt;/P&gt;&lt;P&gt;IF(i&amp;lt;&amp;gt;1, $(ch)&amp;amp;"+");&lt;/P&gt;&lt;P&gt;What is that supposed to do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 15:53:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DO-LOOP-STATEMENT-PROBLEM/m-p/233400#M84937</guid>
      <dc:creator>gandalfgray</dc:creator>
      <dc:date>2010-12-27T15:53:00Z</dc:date>
    </item>
    <item>
      <title>Re. :SV:DO LOOP STATEMENT PROBLEM</title>
      <link>https://community.qlik.com/t5/QlikView/DO-LOOP-STATEMENT-PROBLEM/m-p/233401#M84938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In fact, CH is a string.&lt;/P&gt;&lt;P&gt;I'd like that if the value of the variable i is different from 1,&lt;/P&gt;&lt;P&gt;which is concatenated to the end of the chain CH character '+'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 16:03:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DO-LOOP-STATEMENT-PROBLEM/m-p/233401#M84938</guid>
      <dc:creator />
      <dc:date>2010-12-27T16:03:08Z</dc:date>
    </item>
    <item>
      <title>SV:DO LOOP STATEMENT PROBLEM</title>
      <link>https://community.qlik.com/t5/QlikView/DO-LOOP-STATEMENT-PROBLEM/m-p/233402#M84939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe something like this:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Let i = 1;&lt;BR /&gt;Let ch = "=";&lt;BR /&gt;do while Not IsNull(FieldValue('RV', i))&lt;BR /&gt; if i &amp;gt; 1 then&lt;BR /&gt; Let ch = '$(ch)+';&lt;BR /&gt; end if&lt;BR /&gt; Let ch = '$(ch)SUM({$&amp;lt;COMPTE={"' &amp;amp; FieldValue('RV', i) &amp;amp; '*"}&amp;gt;} DEBIT_CLO)';&lt;BR /&gt; i = i + 1;&lt;BR /&gt;loop&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 16:07:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DO-LOOP-STATEMENT-PROBLEM/m-p/233402#M84939</guid>
      <dc:creator>gandalfgray</dc:creator>
      <dc:date>2010-12-27T16:07:47Z</dc:date>
    </item>
    <item>
      <title>DO LOOP STATEMENT PROBLEM</title>
      <link>https://community.qlik.com/t5/QlikView/DO-LOOP-STATEMENT-PROBLEM/m-p/233403#M84940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello YIMEN,&lt;/P&gt;&lt;P&gt;you are coding a load-script. There is another syntax as you know from expressions. For ex. the IF-Statements are quite different. Take a look at my script snippet to get a direction:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;LET i = 1;&lt;BR /&gt;SET ch = "=";&lt;BR /&gt;&lt;BR /&gt;DO while i&amp;lt;3&lt;BR /&gt; IF(i&amp;lt;&amp;gt;1) THEN&lt;BR /&gt; LET ch= $(ch) &amp;amp; '+';&lt;BR /&gt; ENDIF;&lt;BR /&gt; TRACE --&amp;gt; $(i): $(ch);&lt;BR /&gt; LET i= $(i) +1;&lt;BR /&gt;LOOP;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;HtH&lt;/P&gt;&lt;P&gt;Roland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 16:08:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DO-LOOP-STATEMENT-PROBLEM/m-p/233403#M84940</guid>
      <dc:creator />
      <dc:date>2010-12-27T16:08:48Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: DO LOOP STATEMENT PROBLEM</title>
      <link>https://community.qlik.com/t5/QlikView/DO-LOOP-STATEMENT-PROBLEM/m-p/233404#M84941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please Roland, can you explain me every statement of your script&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;Roland Kunle wrote:&lt;BR /&gt;Hello YIMEN,&lt;BR /&gt;you are coding a load-script. There is another syntax as you know from expressions. For ex. the IF-Statements are quite different. Take a look at my script snippet to get a direction:&lt;BR /&gt; &amp;lt;blockquote&amp;gt;&amp;lt;pre&amp;gt;&lt;BR /&gt;LET i = 1;&lt;BR /&gt;SET ch = "=";&lt;BR /&gt;&lt;BR /&gt;DO while i&amp;lt;3&lt;BR /&gt; IF(i&amp;lt;&amp;gt;1) THEN&lt;BR /&gt; LET ch= $(ch) &amp;amp; '+';&lt;BR /&gt; ENDIF;&lt;BR /&gt; TRACE --&amp;gt; $(i): $(ch);&lt;BR /&gt; LET i= $(i) +1;&lt;BR /&gt;LOOP;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;HtH&lt;/P&gt;&lt;P&gt;Roland&lt;/P&gt;&lt;DIV style="clear:both;"&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 16:14:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DO-LOOP-STATEMENT-PROBLEM/m-p/233404#M84941</guid>
      <dc:creator />
      <dc:date>2010-12-27T16:14:41Z</dc:date>
    </item>
    <item>
      <title>Re. :SV:DO LOOP STATEMENT PROBLEM</title>
      <link>https://community.qlik.com/t5/QlikView/DO-LOOP-STATEMENT-PROBLEM/m-p/233405#M84942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please GORAN, How do I see the contents of the variable CH&lt;/P&gt;&lt;P&gt;[quote user="Göran K"]&lt;/P&gt;&lt;P&gt;Maybe something like this:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x:scroll;"&gt;&lt;PRE style="margin:0px;"&gt;Let i = 1;&lt;BR /&gt;Let ch = "=";&lt;BR /&gt;do while Not IsNull(FieldValue('RV', i))&lt;BR /&gt; if i &amp;gt; 1 then&lt;BR /&gt; Let ch = '$(ch)+';&lt;BR /&gt; end if&lt;BR /&gt; Let ch = '$(ch)SUM({tiny_mce_markerlt;COMPTE={"' &amp;amp; FieldValue('RV', i) &amp;amp; '*"}&amp;gt;} DEBIT_CLO)';&lt;BR /&gt; i = i + 1;&lt;BR /&gt;loop&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV style="clear:both;"&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 16:16:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DO-LOOP-STATEMENT-PROBLEM/m-p/233405#M84942</guid>
      <dc:creator />
      <dc:date>2010-12-27T16:16:40Z</dc:date>
    </item>
    <item>
      <title>SV:Re. :SV:DO LOOP STATEMENT PROBLEM</title>
      <link>https://community.qlik.com/t5/QlikView/DO-LOOP-STATEMENT-PROBLEM/m-p/233406#M84943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are several ways:&lt;/P&gt;&lt;P&gt;- you can load in debug mode and inspect the variable ch for each step.&lt;/P&gt;&lt;P&gt;- in your loaded application you can see the variable ch using Ctrl+Alt+V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 16:26:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DO-LOOP-STATEMENT-PROBLEM/m-p/233406#M84943</guid>
      <dc:creator>gandalfgray</dc:creator>
      <dc:date>2010-12-27T16:26:19Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: DO LOOP STATEMENT PROBLEM</title>
      <link>https://community.qlik.com/t5/QlikView/DO-LOOP-STATEMENT-PROBLEM/m-p/233407#M84944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Yimen,&lt;/P&gt;&lt;P&gt;the syntax of the IF in script is&lt;/P&gt;&lt;P&gt;IF ... THEN ... ENDIF&lt;/P&gt;&lt;P&gt;What you are searching for is the&lt;/P&gt;&lt;P&gt;TRACE $(variable)&lt;/P&gt;&lt;P&gt;to see what is in your variable. And to count your running I use the LET - Statement within the LOOP.&lt;/P&gt;&lt;P&gt;RR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 16:36:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DO-LOOP-STATEMENT-PROBLEM/m-p/233407#M84944</guid>
      <dc:creator />
      <dc:date>2010-12-27T16:36:55Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Re: DO LOOP STATEMENT PROBLEM</title>
      <link>https://community.qlik.com/t5/QlikView/DO-LOOP-STATEMENT-PROBLEM/m-p/233408#M84945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sir KUNLE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 17:03:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/DO-LOOP-STATEMENT-PROBLEM/m-p/233408#M84945</guid>
      <dc:creator />
      <dc:date>2010-12-27T17:03:40Z</dc:date>
    </item>
  </channel>
</rss>

