<?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 using loop FOR EACH ... NEXT in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/using-loop-FOR-EACH-NEXT/m-p/181725#M47634</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I need to join tables from active tables list. Please see the code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;Table1=1;&lt;BR /&gt;Table2=1;&lt;BR /&gt;Table3=0;&lt;BR /&gt;IF Table1=1 THEN&lt;BR /&gt;NOCONCATENATE&lt;BR /&gt;TABLE1:&lt;BR /&gt;LOAD * INLINE&lt;BR /&gt;[&lt;BR /&gt; VAR1, VAR2, VAR3&lt;BR /&gt; A, 1, X&lt;BR /&gt; B, 2, X&lt;BR /&gt;];&lt;BR /&gt;ENDIF&lt;BR /&gt;IF Table2=1 THEN&lt;BR /&gt;NOCONCATENATE&lt;BR /&gt;TABLE2:&lt;BR /&gt;LOAD * INLINE&lt;BR /&gt;[&lt;BR /&gt; VAR1, VAR2, VAR4&lt;BR /&gt; C, 3, Y&lt;BR /&gt; D, 2, Z&lt;BR /&gt;];&lt;BR /&gt;ENDIF&lt;BR /&gt;IF Table3=1 THEN&lt;BR /&gt;NOCONCATENATE&lt;BR /&gt;TABLE3:&lt;BR /&gt;LOAD * INLINE&lt;BR /&gt;[&lt;BR /&gt; VAR1, VAR2, VAR3&lt;BR /&gt; E, 1, 0&lt;BR /&gt; F, 4, X&lt;BR /&gt;];&lt;BR /&gt;ENDIF&lt;BR /&gt;InTable:&lt;BR /&gt;LOAD IF(TableName=1,TableID) as Table&lt;BR /&gt;INLINE&lt;BR /&gt; [&lt;BR /&gt; TableName, TableID&lt;BR /&gt;&lt;BR /&gt; $(Table1), TABLE1&lt;BR /&gt; $(Table2), TABLE2&lt;BR /&gt; $(Table3), TABLE3&lt;BR /&gt; ];&lt;BR /&gt;FOR EACH vTable IN {"Need to take $(Table) from InTable"}&lt;BR /&gt;ActiveList:&lt;BR /&gt;LOAD VAR1,&lt;BR /&gt; VAR2&lt;BR /&gt;RESIDENT $(vTable);&lt;BR /&gt;DROP TABLE $(vTable);&lt;BR /&gt;NEXT vTable;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Thank's for any reply,&lt;/P&gt;&lt;P&gt;Justinas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Mar 2010 12:39:13 GMT</pubDate>
    <dc:creator>justinasp</dc:creator>
    <dc:date>2010-03-16T12:39:13Z</dc:date>
    <item>
      <title>using loop FOR EACH ... NEXT</title>
      <link>https://community.qlik.com/t5/QlikView/using-loop-FOR-EACH-NEXT/m-p/181725#M47634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I need to join tables from active tables list. Please see the code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;Table1=1;&lt;BR /&gt;Table2=1;&lt;BR /&gt;Table3=0;&lt;BR /&gt;IF Table1=1 THEN&lt;BR /&gt;NOCONCATENATE&lt;BR /&gt;TABLE1:&lt;BR /&gt;LOAD * INLINE&lt;BR /&gt;[&lt;BR /&gt; VAR1, VAR2, VAR3&lt;BR /&gt; A, 1, X&lt;BR /&gt; B, 2, X&lt;BR /&gt;];&lt;BR /&gt;ENDIF&lt;BR /&gt;IF Table2=1 THEN&lt;BR /&gt;NOCONCATENATE&lt;BR /&gt;TABLE2:&lt;BR /&gt;LOAD * INLINE&lt;BR /&gt;[&lt;BR /&gt; VAR1, VAR2, VAR4&lt;BR /&gt; C, 3, Y&lt;BR /&gt; D, 2, Z&lt;BR /&gt;];&lt;BR /&gt;ENDIF&lt;BR /&gt;IF Table3=1 THEN&lt;BR /&gt;NOCONCATENATE&lt;BR /&gt;TABLE3:&lt;BR /&gt;LOAD * INLINE&lt;BR /&gt;[&lt;BR /&gt; VAR1, VAR2, VAR3&lt;BR /&gt; E, 1, 0&lt;BR /&gt; F, 4, X&lt;BR /&gt;];&lt;BR /&gt;ENDIF&lt;BR /&gt;InTable:&lt;BR /&gt;LOAD IF(TableName=1,TableID) as Table&lt;BR /&gt;INLINE&lt;BR /&gt; [&lt;BR /&gt; TableName, TableID&lt;BR /&gt;&lt;BR /&gt; $(Table1), TABLE1&lt;BR /&gt; $(Table2), TABLE2&lt;BR /&gt; $(Table3), TABLE3&lt;BR /&gt; ];&lt;BR /&gt;FOR EACH vTable IN {"Need to take $(Table) from InTable"}&lt;BR /&gt;ActiveList:&lt;BR /&gt;LOAD VAR1,&lt;BR /&gt; VAR2&lt;BR /&gt;RESIDENT $(vTable);&lt;BR /&gt;DROP TABLE $(vTable);&lt;BR /&gt;NEXT vTable;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Thank's for any reply,&lt;/P&gt;&lt;P&gt;Justinas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Mar 2010 12:39:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-loop-FOR-EACH-NEXT/m-p/181725#M47634</guid>
      <dc:creator>justinasp</dc:creator>
      <dc:date>2010-03-16T12:39:13Z</dc:date>
    </item>
    <item>
      <title>using loop FOR EACH ... NEXT</title>
      <link>https://community.qlik.com/t5/QlikView/using-loop-FOR-EACH-NEXT/m-p/181726#M47635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Use PEEK(). [Schemas]: LOAD * INLINE [ SCHEMANAME, SCHEMATABLES SIS001, "('SCHEMA001','SCHEMA002')" SIS002, "('SCHEMA001','SCHEMA003')" ]; [t_Schemas]: LOAD recno() as SCHEMACOUNT RESIDENT [Schemas]; let count = 1; let schemaCount = peek('SCHEMACOUNT',-1,[t_Schemas]); drop table [t_Schemas]; do while count&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Mar 2010 13:52:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-loop-FOR-EACH-NEXT/m-p/181726#M47635</guid>
      <dc:creator />
      <dc:date>2010-03-16T13:52:15Z</dc:date>
    </item>
    <item>
      <title>using loop FOR EACH ... NEXT</title>
      <link>https://community.qlik.com/t5/QlikView/using-loop-FOR-EACH-NEXT/m-p/181727#M47636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Fabio,&lt;/P&gt;&lt;P&gt;I'm not sure if I got your mind or your solution is not, what I am looking for this time.&lt;/P&gt;&lt;P&gt;My issue is to &lt;STRONG&gt;use field value from the Inline table as a variable in a loop&lt;/STRONG&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Mar 2010 15:05:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-loop-FOR-EACH-NEXT/m-p/181727#M47636</guid>
      <dc:creator>justinasp</dc:creator>
      <dc:date>2010-03-16T15:05:08Z</dc:date>
    </item>
    <item>
      <title>using loop FOR EACH ... NEXT</title>
      <link>https://community.qlik.com/t5/QlikView/using-loop-FOR-EACH-NEXT/m-p/181728#M47637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not understanding exactly what you are rying to accomplish, biut a suggeted syntax may be:&lt;/P&gt;&lt;P&gt;FOR i = 0 TO NoOfRows('InTable') - 1&lt;BR /&gt;LET vTable = peek('TableID', $(i), 'InTable')&lt;/P&gt;&lt;P&gt;LOAD VAR1,&lt;BR /&gt; VAR2&lt;BR /&gt;RESIDENT $(vTable);&lt;BR /&gt;DROP TABLE $(vTable);&lt;BR /&gt;NEXT i&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Mar 2010 07:55:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-loop-FOR-EACH-NEXT/m-p/181728#M47637</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2010-03-17T07:55:20Z</dc:date>
    </item>
    <item>
      <title>using loop FOR EACH ... NEXT</title>
      <link>https://community.qlik.com/t5/QlikView/using-loop-FOR-EACH-NEXT/m-p/181729#M47638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It was just a peace of the big view, but you leaded me to the right direction. Thank's for your help, Rob.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Mar 2010 11:28:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-loop-FOR-EACH-NEXT/m-p/181729#M47638</guid>
      <dc:creator>justinasp</dc:creator>
      <dc:date>2010-03-17T11:28:42Z</dc:date>
    </item>
  </channel>
</rss>

