<?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: Store loop in QVD file in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Store-loop-in-QVD-file/m-p/354448#M1173589</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the instant reply Miguel.&lt;/P&gt;&lt;P&gt;Its working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Manisha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Jun 2012 12:07:26 GMT</pubDate>
    <dc:creator>manisha_uit</dc:creator>
    <dc:date>2012-06-15T12:07:26Z</dc:date>
    <item>
      <title>Store loop in QVD file</title>
      <link>https://community.qlik.com/t5/QlikView/Store-loop-in-QVD-file/m-p/354446#M1173587</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 loop like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vWeeks=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;FOR counter = 2012 to year(Today()) +1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR counter1 = 1 to 12&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;IF WeekDay(MakeDate(counter, counter1)) = 'Sun' then&lt;/P&gt;&lt;P&gt;$(vWeeks)=4;&lt;/P&gt;&lt;P&gt;ELSEIF WeekDay(MakeDate(counter, counter1)) = 'Mon' then&lt;/P&gt;&lt;P&gt;$(vWeeks)=4;&lt;/P&gt;&lt;P&gt;ELSEIF WeekDay(MakeDate(counter, counter1)) = 'Tue' then&lt;/P&gt;&lt;P&gt;$(vWeeks)=5;&lt;/P&gt;&lt;P&gt;ELSEIF WeekDay(MakeDate(counter, counter1)) = 'Wed' then&lt;/P&gt;&lt;P&gt;$(vWeeks)=5;&lt;/P&gt;&lt;P&gt;ELSEIF WeekDay(MakeDate(counter, counter1)) = 'Thu' then&lt;/P&gt;&lt;P&gt;$(vWeeks)=5;&lt;/P&gt;&lt;P&gt;ELSEIF WeekDay(MakeDate(counter, counter1)) = 'Fri' then&lt;/P&gt;&lt;P&gt;$(vWeeks)=4;&lt;/P&gt;&lt;P&gt;ELSE&lt;/P&gt;&lt;P&gt;$(vWeeks)=4;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; NEXT counter1&lt;/P&gt;&lt;P&gt;ENDIF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NEXT counter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to store the above loop in a qvd so that i can use it in a different qvw file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Manisha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2012 09:54:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Store-loop-in-QVD-file/m-p/354446#M1173587</guid>
      <dc:creator>manisha_uit</dc:creator>
      <dc:date>2012-06-15T09:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Store loop in QVD file</title>
      <link>https://community.qlik.com/t5/QlikView/Store-loop-in-QVD-file/m-p/354447#M1173588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manisha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you mean to store this into a script file so you can reuse in one or more QVW files? If so, the just copy that text into an empty text file (using notepad, for example) and save it as "script.qvs" (use the double quotes).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, to use this code in another file, use the following line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13397545443785531" jivemacro_uid="_13397545443785531"&gt;&lt;P&gt;$(include=script.qvs);&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That will add the lines in the file "script.qvs" into the current position, and they will be executed as any other instruction in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2012 10:02:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Store-loop-in-QVD-file/m-p/354447#M1173588</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2012-06-15T10:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Store loop in QVD file</title>
      <link>https://community.qlik.com/t5/QlikView/Store-loop-in-QVD-file/m-p/354448#M1173589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the instant reply Miguel.&lt;/P&gt;&lt;P&gt;Its working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Manisha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2012 12:07:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Store-loop-in-QVD-file/m-p/354448#M1173589</guid>
      <dc:creator>manisha_uit</dc:creator>
      <dc:date>2012-06-15T12:07:26Z</dc:date>
    </item>
  </channel>
</rss>

