<?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 How to drop variables from a qvw? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-drop-variables-from-a-qvw/m-p/511228#M689520</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 have a pretty complicated code to find out the valid cost_center for every employee for every single day from his/her join_date to (his/her leaving_date or today).&lt;/P&gt;&lt;P&gt;The code works for one single employee, I have thoroughly tested it on a few quite difficult scenarios and it was correct all the way.&lt;/P&gt;&lt;P&gt;Now I've made this into a subroutine and built a FOR...NEXT loop over the employees and call this subroutine once per line (Í pass the line_nr to the subroutine, not the emp_ID, I think that simple consecutive numbers are easiest for QlikView and thus fastest)&lt;/P&gt;&lt;P&gt;=&amp;gt; The code runs error-free through all lines of the employee_list.`&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only remaining problem - I hope it's the only one remaining - is: The loops goes like&lt;/P&gt;&lt;P&gt;FOR i = 1 TO NoOfRows('Tablename')&lt;/P&gt;&lt;P&gt;&amp;nbsp; CALL ...&lt;/P&gt;&lt;P&gt;NEXT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the end of this, I just wanted to have a look at my counter i to see if it had the right value and I saw just that nr. of variables there - one variable labeled '1', one labeled '2' and so on all the way through to 1.000+&lt;/P&gt;&lt;P&gt;Is there some way I can drop those along the way?&lt;/P&gt;&lt;P&gt;&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;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: I create several variables in every run of the subroutine, with both SET and LET&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Nov 2013 09:49:44 GMT</pubDate>
    <dc:creator>datanibbler</dc:creator>
    <dc:date>2013-11-12T09:49:44Z</dc:date>
    <item>
      <title>How to drop variables from a qvw?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-drop-variables-from-a-qvw/m-p/511228#M689520</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 have a pretty complicated code to find out the valid cost_center for every employee for every single day from his/her join_date to (his/her leaving_date or today).&lt;/P&gt;&lt;P&gt;The code works for one single employee, I have thoroughly tested it on a few quite difficult scenarios and it was correct all the way.&lt;/P&gt;&lt;P&gt;Now I've made this into a subroutine and built a FOR...NEXT loop over the employees and call this subroutine once per line (Í pass the line_nr to the subroutine, not the emp_ID, I think that simple consecutive numbers are easiest for QlikView and thus fastest)&lt;/P&gt;&lt;P&gt;=&amp;gt; The code runs error-free through all lines of the employee_list.`&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only remaining problem - I hope it's the only one remaining - is: The loops goes like&lt;/P&gt;&lt;P&gt;FOR i = 1 TO NoOfRows('Tablename')&lt;/P&gt;&lt;P&gt;&amp;nbsp; CALL ...&lt;/P&gt;&lt;P&gt;NEXT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the end of this, I just wanted to have a look at my counter i to see if it had the right value and I saw just that nr. of variables there - one variable labeled '1', one labeled '2' and so on all the way through to 1.000+&lt;/P&gt;&lt;P&gt;Is there some way I can drop those along the way?&lt;/P&gt;&lt;P&gt;&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;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: I create several variables in every run of the subroutine, with both SET and LET&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Nov 2013 09:49:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-drop-variables-from-a-qvw/m-p/511228#M689520</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-11-12T09:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to drop variables from a qvw?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-drop-variables-from-a-qvw/m-p/511229#M689521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an idea:&lt;/P&gt;&lt;P&gt;- The variables really have the same name and value - the variable labeled '1' has the value 1, the one labeled '2' has the value 2 and so on.&lt;/P&gt;&lt;P&gt;=&amp;gt; I suppose this is the line_ID that I pass to the subroutine:&lt;/P&gt;&lt;P&gt;- This is actually my counter i that I use in the loop&lt;/P&gt;&lt;P&gt;- I call the sub like &amp;gt;&amp;gt;&amp;gt; CALL Kostenstellenroutine ($(i))&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;lt;&amp;lt;&amp;lt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;=&amp;gt; The sub itself begins like &amp;gt;&amp;gt;&amp;gt; sub Kostenstellenroutine (v_lineID) &amp;lt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;=&amp;gt; The counter i is thus passed to the sub labeled v_lineID.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;=&amp;gt; I suppose, but unfortunately I cannot check, that this variable that is left over with every single call of the sub is just this counter.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;In another thread on a similar issue, I found that &amp;gt;&amp;gt;&amp;gt; LET [var] = NULL(); &amp;lt;&amp;lt;&amp;lt; could be used &amp;lt;=&amp;gt; I cannot do that because I cannot use the semicolon or my LOOP will stop right there.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I guess, though, that those variables cost me very little in terms of performance, so I can just build a second LOOP and delete them all?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;P.S.: No, obviously it was not that - that second LOOP seemingly did not even execute.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Nov 2013 10:11:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-drop-variables-from-a-qvw/m-p/511229#M689521</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-11-12T10:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to drop variables from a qvw?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-drop-variables-from-a-qvw/m-p/511230#M689522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all, is it necessary to create lot of variables in the For Loop ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In loop, we create one variable and change that Variable value in every loop execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The another way, just Let vName = ; at end of loop execution its automatically de-allocate the variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2013 14:18:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-drop-variables-from-a-qvw/m-p/511230#M689522</guid>
      <dc:creator />
      <dc:date>2013-11-13T14:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to drop variables from a qvw?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-drop-variables-from-a-qvw/m-p/511231#M689523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi datu.qv,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;no, it is surely not necessary - the problem is, all of these variables just have a number as label - I cannot tell at which point in the code they are actually generated.&lt;/P&gt;&lt;P&gt;I will have another look at the SET and LET commands in the code - I believe there are several.&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>Thu, 14 Nov 2013 08:28:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-drop-variables-from-a-qvw/m-p/511231#M689523</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-11-14T08:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to drop variables from a qvw?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-drop-variables-from-a-qvw/m-p/511232#M689524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi dathu.qv,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looked through my code and though there are a few variables inside the subroutine, those are updated with every calling of the subroutine.&lt;/P&gt;&lt;P&gt;=&amp;gt; It looks very much like those variables are something to do with my counter.&lt;/P&gt;&lt;P&gt;I post the code of my loop here, there's nothing much to it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;// Here I load a list of the emps we have RESIDENT from the base_load - a step that might be skipped...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Mitarbeiterliste:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;GPEline&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; MA_Grunddaten2&lt;BR /&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;// this variable is also just for my own information and not relevant to the functioning of the code.&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LET&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;v_emps&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NoOfRows&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('Mitarbeiterliste');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;FOR&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;i&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 1 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;TO&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NoOfRows&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('Mitarbeiterliste')&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;CALL&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Kostenstellenroutine&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(i)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;next &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Now, that counter i takes on the values from 1 to, say, 1000 - and I have just the same nr. of variables created.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Can you tell me what's wrong there?`&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Thanks a lot!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DataNibbler&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Nov 2013 09:10:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-drop-variables-from-a-qvw/m-p/511232#M689524</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-11-14T09:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to drop variables from a qvw?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-drop-variables-from-a-qvw/m-p/511233#M689525</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;This is a problem I saw discussed recently. You need to wrap the parameter in () to convert it to an expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL Kostenstellenroutine (($(i)))&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;CALL Kostenstellenroutine ((i))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(This appears to be a bug in 11.0 or 11.2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Nov 2013 09:16:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-drop-variables-from-a-qvw/m-p/511233#M689525</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2013-11-14T09:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to drop variables from a qvw?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-drop-variables-from-a-qvw/m-p/511234#M689526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, here is a link to a recent discussion.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/98145"&gt;[11.2 SR4] Why Sleep function creates a variable ?&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Nov 2013 09:20:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-drop-variables-from-a-qvw/m-p/511234#M689526</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-11-14T09:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to drop variables from a qvw?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-drop-variables-from-a-qvw/m-p/511235#M689527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had it with that $-sign-expansion as &amp;gt;&amp;gt;&amp;gt; $(i) &amp;lt;&amp;lt;&amp;lt; (I had understood, from "QlikView 11 for Developers" that you should just ALWAYS use it (necessary or not) just to keep things in sync.&lt;/P&gt;&lt;P&gt;I will now try the other variant.&lt;/P&gt;&lt;P&gt;&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>Thu, 14 Nov 2013 09:21:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-drop-variables-from-a-qvw/m-p/511235#M689527</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-11-14T09:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to drop variables from a qvw?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-drop-variables-from-a-qvw/m-p/511236#M689528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks! I looked into it. But - does anyone from QlikTech look at those threads`(same as with the ideas_section)`?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@ Jonathan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks! It works. I just tried with just the first 10 records so it wouldn't run so long and no variables were created.&lt;/P&gt;&lt;P&gt;&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>Thu, 14 Nov 2013 09:26:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-drop-variables-from-a-qvw/m-p/511236#M689528</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-11-14T09:26:13Z</dc:date>
    </item>
  </channel>
</rss>

