<?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: (Semantic) Error in for Loop with a if-condition in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Semantic-Error-in-for-Loop-with-a-if-condition/m-p/1533341#M43945</link>
    <description>&lt;P&gt;Would you be able to share a sample where I can see what you have? I am just seeing half of the script and that to without knowing your data... if you can mock up your scenario for me, I should be able to help you better&lt;/P&gt;</description>
    <pubDate>Tue, 22 Jan 2019 14:52:16 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2019-01-22T14:52:16Z</dc:date>
    <item>
      <title>(Semantic) Error in for Loop with a if-condition</title>
      <link>https://community.qlik.com/t5/App-Development/Semantic-Error-in-for-Loop-with-a-if-condition/m-p/1533246#M43940</link>
      <description>&lt;P&gt;Good Day,&lt;/P&gt;
&lt;P&gt;im very new in this Topic and i can't explain whats wrong with this tiny part of a code.&lt;/P&gt;
&lt;P&gt;I receive the Error Message:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Semantic error&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;The control statement is not correctly matched with its corresponding start statement&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;next counter &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Mtart_G is a column of a table which I've created earlier in the code&lt;/EM&gt;&lt;/P&gt;
&lt;PRE&gt;let counter = 0; &lt;BR /&gt;let boolean = 'false' ;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;for counter = 1 to 10    //count(Mtart_G);
  
	if Mtart_G = 151 then 
	boolean = 'true'
 
next counter ;&lt;/PRE&gt;
&lt;P&gt;Sincerely,&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 06:47:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Semantic-Error-in-for-Loop-with-a-if-condition/m-p/1533246#M43940</guid>
      <dc:creator>senior_freshmen</dc:creator>
      <dc:date>2024-11-16T06:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: (Semantic) Error in for Loop with a if-condition</title>
      <link>https://community.qlik.com/t5/App-Development/Semantic-Error-in-for-Loop-with-a-if-condition/m-p/1533248#M43941</link>
      <description>&lt;P&gt;You need END IF&lt;/P&gt;&lt;PRE&gt;let counter = 0; 
let boolean = 'false' ; 

for counter = 1 to 10    //count(Mtart_G);
  
	if Mtart_G = 151 then 
	boolean = 'true'
        &lt;FONT color="#FF0000"&gt;END IF;&lt;/FONT&gt;
 
next counter ;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Jan 2019 12:41:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Semantic-Error-in-for-Loop-with-a-if-condition/m-p/1533248#M43941</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-01-22T12:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: (Semantic) Error in for Loop with a if-condition</title>
      <link>https://community.qlik.com/t5/App-Development/Semantic-Error-in-for-Loop-with-a-if-condition/m-p/1533260#M43942</link>
      <description>Ok thanks at all, that was a simple fault.&lt;BR /&gt;&lt;BR /&gt;The Syntax is correct, but somehow it doesn't work at all how it was planned.&lt;BR /&gt;My plan was to search an specific value in the Column 'Mtart'. When its true boolean should be 'true' too. But it doesnt.&lt;BR /&gt;Could you help me with this too?</description>
      <pubDate>Tue, 22 Jan 2019 12:55:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Semantic-Error-in-for-Loop-with-a-if-condition/m-p/1533260#M43942</guid>
      <dc:creator>senior_freshmen</dc:creator>
      <dc:date>2019-01-22T12:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: (Semantic) Error in for Loop with a if-condition</title>
      <link>https://community.qlik.com/t5/App-Development/Semantic-Error-in-for-Loop-with-a-if-condition/m-p/1533264#M43943</link>
      <description>&lt;P&gt;Not really sure what you have for&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;Mtart_G. &lt;/STRONG&gt;May be you need to use it with $()&lt;/P&gt;&lt;PRE&gt;let counter = 0; 
let boolean = 'false' ; 

for counter = 1 to 10    //count(Mtart_G);
  
	if &lt;FONT color="#FF0000"&gt;$(&lt;/FONT&gt;Mtart_G&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt; = 151 then 
	boolean = 'true'
        END IF;
 
next counter ;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Jan 2019 12:59:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Semantic-Error-in-for-Loop-with-a-if-condition/m-p/1533264#M43943</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-01-22T12:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: (Semantic) Error in for Loop with a if-condition</title>
      <link>https://community.qlik.com/t5/App-Development/Semantic-Error-in-for-Loop-with-a-if-condition/m-p/1533330#M43944</link>
      <description>No, doesn't work.&lt;BR /&gt;To make sure we dont have a missunderstanding. Mtart_G is a column in an table, filled with numbers. I want to set boolean = 'true' if the Loop finds the value '151' in this column.</description>
      <pubDate>Tue, 22 Jan 2019 14:42:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Semantic-Error-in-for-Loop-with-a-if-condition/m-p/1533330#M43944</guid>
      <dc:creator>senior_freshmen</dc:creator>
      <dc:date>2019-01-22T14:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: (Semantic) Error in for Loop with a if-condition</title>
      <link>https://community.qlik.com/t5/App-Development/Semantic-Error-in-for-Loop-with-a-if-condition/m-p/1533341#M43945</link>
      <description>&lt;P&gt;Would you be able to share a sample where I can see what you have? I am just seeing half of the script and that to without knowing your data... if you can mock up your scenario for me, I should be able to help you better&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 14:52:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Semantic-Error-in-for-Loop-with-a-if-condition/m-p/1533341#M43945</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-01-22T14:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: (Semantic) Error in for Loop with a if-condition</title>
      <link>https://community.qlik.com/t5/App-Development/Semantic-Error-in-for-Loop-with-a-if-condition/m-p/1533789#M43946</link>
      <description>&lt;P&gt;You could use the following to detect if a certain value exists within the datamodel:&lt;/P&gt;&lt;P&gt;let boolean = if(fieldindex('Mtart_G', 151), dual('true', 1), dual('false', 0));&lt;/P&gt;&lt;P&gt;If you need to check this by key-fields within a certain table you will need to ensure a certain order of your loadings or you need to load it from this table - whereby in this case the check might be already done within the origin load.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2019 11:43:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Semantic-Error-in-for-Loop-with-a-if-condition/m-p/1533789#M43946</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-01-23T11:43:10Z</dc:date>
    </item>
  </channel>
</rss>

