<?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: Autogenerate inside Loop in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Autogenerate-inside-Loop/m-p/580781#M680822</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent it is working. IterNo() is used as serial, and while ..... close was used as condition. I appreciate for your fast and elegant resolution. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Mar 2014 15:39:01 GMT</pubDate>
    <dc:creator>atsushi_saijo</dc:creator>
    <dc:date>2014-03-31T15:39:01Z</dc:date>
    <item>
      <title>Autogenerate inside Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Autogenerate-inside-Loop/m-p/580778#M680819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I stumbled in a requirement where I must autogenerate NoOfRow() inside loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Specifically, this application is used as a source file for labels. The user put an excel file, where [a.] part number; [b.] Maximum number of labels to print.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="99" style="border: 1px solid #000000; border-image: none; width: 313px; height: 93px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Part Number&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Maximum Number of Labels&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script should produce such result:&lt;/P&gt;&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&lt;/P&gt;&lt;P&gt;C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Attempted Script]&lt;/P&gt;&lt;P&gt;I have initially authored such script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Initial Load&lt;/P&gt;&lt;P&gt;T1: Load [Part Number] as P#, [Maximum Number of Labels] as Max from (Source Excel);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Getting maximum number of rows in the source file&lt;/P&gt;&lt;P&gt;Let noRows = NoOfRows('T1')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//define loop condition&lt;/P&gt;&lt;P&gt;for i=0 to $(noRows)-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let a = peek ('P#', $(i), 'T1');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let b = peek ('Max', $(i), 'T1');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Generate serialised number&lt;/P&gt;&lt;P&gt;T2: Load RowNo() as Serial Autogenerate $(b),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Issue]&lt;/P&gt;&lt;P&gt;However; it seems $(b) is not passed. Just error and stops execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would appreciate for any help on this script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Atsushi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 15:27:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Autogenerate-inside-Loop/m-p/580778#M680819</guid>
      <dc:creator>atsushi_saijo</dc:creator>
      <dc:date>2014-03-31T15:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: Autogenerate inside Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Autogenerate-inside-Loop/m-p/580779#M680820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using the while keyword:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *, iterno() as RecNo &lt;/P&gt;&lt;P&gt;while IterNo() &amp;lt;= [Maximum Number of Labels] &lt;/P&gt;&lt;P&gt;From &lt;EM&gt;...somewhere...&lt;/EM&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 15:33:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Autogenerate-inside-Loop/m-p/580779#M680820</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-03-31T15:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Autogenerate inside Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Autogenerate-inside-Loop/m-p/580780#M680821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I am trying now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 15:34:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Autogenerate-inside-Loop/m-p/580780#M680821</guid>
      <dc:creator>atsushi_saijo</dc:creator>
      <dc:date>2014-03-31T15:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: Autogenerate inside Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Autogenerate-inside-Loop/m-p/580781#M680822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent it is working. IterNo() is used as serial, and while ..... close was used as condition. I appreciate for your fast and elegant resolution. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 15:39:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Autogenerate-inside-Loop/m-p/580781#M680822</guid>
      <dc:creator>atsushi_saijo</dc:creator>
      <dc:date>2014-03-31T15:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: Autogenerate inside Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Autogenerate-inside-Loop/m-p/580782#M680823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;Load * Inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;&amp;nbsp; Part Number, Label&lt;/P&gt;&lt;P&gt;&amp;nbsp; A, 2&lt;/P&gt;&lt;P&gt;&amp;nbsp; B, 5&lt;/P&gt;&lt;P&gt;&amp;nbsp; C, 3&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp; [Part Number],&lt;/P&gt;&lt;P&gt;&amp;nbsp; IterNo() as NO&lt;/P&gt;&lt;P&gt;Resident Temp&lt;/P&gt;&lt;P&gt;While IterNo() &amp;lt;= Label;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table Temp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 15:39:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Autogenerate-inside-Loop/m-p/580782#M680823</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-03-31T15:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Autogenerate inside Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Autogenerate-inside-Loop/m-p/580783#M680824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I appreciate for your support too. Your solution is working. I deeply appreciate for your fast resolution. Atsushi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2014 15:41:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Autogenerate-inside-Loop/m-p/580783#M680824</guid>
      <dc:creator>atsushi_saijo</dc:creator>
      <dc:date>2014-03-31T15:41:32Z</dc:date>
    </item>
  </channel>
</rss>

