<?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: Large loop - keywords five tabs apart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714412#M671168</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could create a routine which called many sub-routines and this is often better then jump from one routine to another and from there jump again ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Oct 2014 12:42:06 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2014-10-13T12:42:06Z</dc:date>
    <item>
      <title>Large loop - keywords five tabs apart</title>
      <link>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714409#M671165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I always split my script into several parts, one part of the script on one tab.&lt;/P&gt;&lt;P&gt;Now I have one large loop that encompasses two subroutines and several more loops&lt;/P&gt;&lt;P&gt;=&amp;gt; To the effect that the keywords "FROM ..." and "NEXT" are five tabs apart&lt;/P&gt;&lt;P&gt;There should actually be no big issue about that - I can easily put "NEXT [Counter]" instead of just "NEXT" and it should be clear for QlikView what is what&lt;/P&gt;&lt;P&gt;&amp;lt;=&amp;gt; It doesn't work: I have tested what is to be my meta_loop on its own - it parses through an inline_table with six sheet_names which&amp;nbsp; correspond to the names of worksheets in an Excel_workbook.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;=&amp;gt; Still, when I activate this meta_loop around all the other stuff - the first time round, my counter_variable (which is not identical to&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; any of the "inner" ones, I have named them all differently) is populated all right and so is the variable for the worksheet I'm&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; currently processing, but after the first iteration is completed, the variable has a NULL value ...&lt;/P&gt;&lt;P&gt;Can anyone help me there?&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>Mon, 13 Oct 2014 12:25:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714409#M671165</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-10-13T12:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: Large loop - keywords five tabs apart</title>
      <link>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714410#M671166</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;there is another way I could try: By making it all into one big subroutine&lt;/P&gt;&lt;P&gt;&amp;lt;=&amp;gt; Can I define a subroutine which contains several others?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 12:31:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714410#M671166</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-10-13T12:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: Large loop - keywords five tabs apart</title>
      <link>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714411#M671167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi DataNibbler,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it's only a small (unexpected) logic-issue. I would run these script within the debugger to see on which step your variable becomes NULL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 12:38:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714411#M671167</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-10-13T12:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Large loop - keywords five tabs apart</title>
      <link>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714412#M671168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could create a routine which called many sub-routines and this is often better then jump from one routine to another and from there jump again ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 12:42:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714412#M671168</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-10-13T12:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: Large loop - keywords five tabs apart</title>
      <link>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714413#M671169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am stepwise_debugging all the time &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; With the first vrs., the variable (current_list) became NULL just when the first iteration was completed and I was back in the meta_loop.&lt;/P&gt;&lt;P&gt;I'm trying the thing with a meta_subroutine now (that will encompass the two other subroutines).&lt;/P&gt;&lt;P&gt;The difficulty is, I need to pass two variables now - a counter_variable and the current list_name.&lt;/P&gt;&lt;P&gt;I'll keep you posted.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 13:00:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714413#M671169</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-10-13T13:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Large loop - keywords five tabs apart</title>
      <link>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714414#M671170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi DataNibbler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I often add TRACE commands to output various variables whilst processing the loop so I can debug exactly what is going on from the log files or load progress window without the need to invoke the debugger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also add a "Trace === TabName=== ;" as the first line of every tab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 13:04:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714414#M671170</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2014-10-13T13:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: Large loop - keywords five tabs apart</title>
      <link>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714415#M671171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi DataNibbler,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it looks that these variable will be defined several times - first in your meta-loop and then in your sub-routine and then in your meta-loop again&amp;nbsp; - if yes you need some logic, either you worked with two variables and/or you need to check if the variable-value had changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 13:21:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714415#M671171</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-10-13T13:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: Large loop - keywords five tabs apart</title>
      <link>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714416#M671172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;no - I am aware of that issue, so I'm trying to give a new name to each one of my variables and I assign them a NULL value when they are not needed anymore so there can't be any confusion.&lt;/P&gt;&lt;P&gt;I have now successfully established a meta_routine that is called once for every one of my six sheets (six times) and that will itself call the two other subroutines. That works - but only for the first sheet (in the first iteration, my counter "superi" has the value 0 because I use the PEEK() fct. from a small inline_table to determine the name of the sheet to process.&lt;/P&gt;&lt;P&gt;&amp;lt;=&amp;gt; In the second iteration, "superi" has the value 1 and the table_name becomes NULL. I have yet to find out why that is happening.&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;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: I am at a loss - when I try only that LOOP, I deactivate the CALL statement and put an EXIT SCRIPT directly after the loop, then it works - I debug it step_by_step and the current_list_variable is properly updated every time.&lt;/P&gt;&lt;P&gt;When, on the other hand, I activate the CALL statement and thus have all the code inbetween, then for the second iteration, "superi" (my counter) is updated from 0 to 1 - and my current_list_variable gets assigned a NULL value ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.P.S.: I have just performed a backward search across all tabs for the name of that counter_variable in that meta_loop, but it is definitely unique.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 14:01:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714416#M671172</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-10-13T14:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Large loop - keywords five tabs apart</title>
      <link>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714417#M671173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi DataNibbler,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe it's really peek() whereat it generally worked good as loop through a table. Perhaps your syntax missed the tablename: peek('field', $(counter), 'tablename') ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 14:27:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714417#M671173</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-10-13T14:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Large loop - keywords five tabs apart</title>
      <link>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714418#M671174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm ... it generally works very well, yes.&lt;/P&gt;&lt;P&gt;I didn't put the tablename into quotes - I wrote like&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; peek('Name', $(v_List), Sheetnames) &amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;I will try with putting both in quotes.&lt;/P&gt;&lt;P&gt;(just to be sure, I tested it again and it is definitely just at the start of the second iteration...)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 14:33:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714418#M671174</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-10-13T14:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: Large loop - keywords five tabs apart</title>
      <link>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714419#M671175</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;that seems to have been the problem.&lt;/P&gt;&lt;P&gt;Now the script starts the second iteration - but then there's an issue: I am getting a &amp;gt;Field not found&amp;lt; at some point when actually that field should certainly be there - it is in every list.&lt;/P&gt;&lt;P&gt;=&amp;gt; How can I look at the contents of a file in RAM at a specific point in the process of my script without taking the entire loop apart?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 14:39:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714419#M671175</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-10-13T14:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Large loop - keywords five tabs apart</title>
      <link>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714420#M671177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could add a qualified load to a test table to see the contents of a table at a particular point in your script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if vLoop = N&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qualify * ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TestTable:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; load * resident TableX ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; unqualify * ;&lt;/P&gt;&lt;P&gt;endif;&amp;nbsp; // if Vloop = N&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could add a where clause or first N&amp;nbsp; if you only want a few records included &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 14:44:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714420#M671177</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2014-10-13T14:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Large loop - keywords five tabs apart</title>
      <link>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714421#M671179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A look into the RAM is more complicated and will need significantly more time as to debug within qv - the suggestions from &lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/people/Colin_Albert" title="http://community.qlik.com/people/Colin_Albert"&gt;http://community.qlik.com/people/Colin_Albert&lt;/A&gt; about using several trace-statements and using from dummy-tables created per qualify-statement are good - I use the same approach if I can't find my mistakes ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 14:48:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714421#M671179</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-10-13T14:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Large loop - keywords five tabs apart</title>
      <link>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714422#M671180</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;&lt;/P&gt;&lt;P&gt;thanks! I made it. Instead of using the variable, which apparently didn't work for some reason, I used the same PEEK() function inside the meta_subroutine that I had used the first time round to feed one of the six entries of my inline_table into a variable.&lt;/P&gt;&lt;P&gt;I guess that is solved now. A good day's work.&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>Mon, 13 Oct 2014 15:08:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Large-loop-keywords-five-tabs-apart/m-p/714422#M671180</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-10-13T15:08:37Z</dc:date>
    </item>
  </channel>
</rss>

