<?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: Change value of field during AutoGenerate in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Change-value-of-field-during-AutoGenerate/m-p/337965#M1169757</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result is two files which I then have to combine.&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/servlet/JiveServlet/showImage/2-245305-19407/weeklink.gif"&gt;&lt;IMG __jive_id="19422" class="jive-image" height="106" alt="weeklink.gif" src="https://community.qlik.com/legacyfs/online/19422_weeklink.gif" width="115" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Fine solution, no problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if I I would like to do this in one go?&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just give your fields the same name ( you don't really want to use these anyway,right?):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;for a = 2011 to 2012&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Weeklnk:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; $(a) &amp;amp; RecNo() &lt;STRONG&gt;as WeeknrKey&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;AutoGenerate(53);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NEXT;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus your tables get auto concatenated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And as already said, just add any number to recno() if you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 04 Aug 2012 21:02:13 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2012-08-04T21:02:13Z</dc:date>
    <item>
      <title>Change value of field during AutoGenerate</title>
      <link>https://community.qlik.com/t5/QlikView/Change-value-of-field-during-AutoGenerate/m-p/337961#M1169753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As part of a script I have the following lines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WeekLink2011:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2011'&amp;amp;rowno() as WEEKLINK2011&lt;/P&gt;&lt;P&gt;AutoGenerate(53);&lt;/P&gt;&lt;P&gt;WeekLink2012:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '2012'&amp;amp;rowno() as WEEKLINK2012&lt;/P&gt;&lt;P&gt;AutoGenerate(53);&lt;/P&gt;&lt;P&gt;WeekLink:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WEEKLINK2011 as WEEKLINK&lt;/P&gt;&lt;P&gt;Resident WeekLink2011; &lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WEEKLINK2012 as WEEKLINK&lt;/P&gt;&lt;P&gt;Resident WeekLink2012; &lt;/P&gt;&lt;P&gt;DROP Tables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WeekLink2011,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WeekLink2012;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is working fine and generates a file that gives me 1 field that contains the value 20111, 20112, ..201153, 20121. 20122, ..201253.&lt;/P&gt;&lt;P&gt;So far so good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I try to learn the syntax and I am looking for the shorter way of doing this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I try something like:&lt;/P&gt;&lt;P&gt;for a = 2011 to 2012&lt;/P&gt;&lt;P&gt;Weeklink:&lt;/P&gt;&lt;P&gt;lOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; $(a) &amp;amp; RowNo()&lt;/P&gt;&lt;P&gt;AutoGenerate(53); &lt;/P&gt;&lt;P&gt;NEXT;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the function row() counts above 53 till 106, so this doesn't work fo me.&lt;/P&gt;&lt;P&gt;So the question is, how to reset RowNo() to one again in the 2nd loop.&lt;/P&gt;&lt;P&gt;Or, and this is what I tried to achieve, what is the syntax for something like this: $(a) &amp;amp; (b=b+1) and reset b at the end of the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gerrit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Aug 2012 13:11:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Change-value-of-field-during-AutoGenerate/m-p/337961#M1169753</guid>
      <dc:creator />
      <dc:date>2012-08-04T13:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: Change value of field during AutoGenerate</title>
      <link>https://community.qlik.com/t5/QlikView/Change-value-of-field-during-AutoGenerate/m-p/337962#M1169754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try using recno() instead of rowno().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;In contrast to &lt;SPAN class="Bold"&gt;RecNo( )&lt;/SPAN&gt;, which counts the records in the raw data table, the &lt;SPAN class="Bold"&gt;RowNo( )&lt;/SPAN&gt; function does not count records that are excluded by &lt;SPAN class="Bold"&gt;where&lt;/SPAN&gt; clauses and &lt;STRONG&gt;is not reset when a raw data table is &lt;A _jive_internal="true" class="MCXref_0" href="https://community.qlik.com/thread"&gt;Concatenation&lt;/A&gt; to another.&lt;/STRONG&gt; &lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Aug 2012 13:59:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Change-value-of-field-during-AutoGenerate/m-p/337962#M1169754</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-08-04T13:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: Change value of field during AutoGenerate</title>
      <link>https://community.qlik.com/t5/QlikView/Change-value-of-field-during-AutoGenerate/m-p/337963#M1169755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That works fine.&lt;/P&gt;&lt;P&gt;And is surely a shorter way.&lt;/P&gt;&lt;P&gt;The result is two files which I then have to combine.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="19407" alt="weeklink.gif" class="jive-image" src="https://community.qlik.com/legacyfs/online/19407_weeklink.gif" /&gt;&lt;/P&gt;&lt;P&gt;Fine solution, no problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if I I would like to do this in one go?&lt;/P&gt;&lt;P&gt;Or, if for example I need to start not with 1 but with 100.&lt;/P&gt;&lt;P&gt;Is there something possible like: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let b = 100;&lt;/P&gt;&lt;P&gt;for a = 2011 to 2012:&lt;/P&gt;&lt;P&gt;Weeklink:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; $(a)&amp;amp; (b=+1)&lt;/P&gt;&lt;P&gt;AutoGenerate(53);&lt;/P&gt;&lt;P&gt;b=100; &lt;/P&gt;&lt;P&gt;NEXT;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Aug 2012 15:05:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Change-value-of-field-during-AutoGenerate/m-p/337963#M1169755</guid>
      <dc:creator />
      <dc:date>2012-08-04T15:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Change value of field during AutoGenerate</title>
      <link>https://community.qlik.com/t5/QlikView/Change-value-of-field-during-AutoGenerate/m-p/337964#M1169756</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;You can use like this, recno()+100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Aug 2012 20:19:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Change-value-of-field-during-AutoGenerate/m-p/337964#M1169756</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-08-04T20:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Change value of field during AutoGenerate</title>
      <link>https://community.qlik.com/t5/QlikView/Change-value-of-field-during-AutoGenerate/m-p/337965#M1169757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result is two files which I then have to combine.&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/servlet/JiveServlet/showImage/2-245305-19407/weeklink.gif"&gt;&lt;IMG __jive_id="19422" class="jive-image" height="106" alt="weeklink.gif" src="https://community.qlik.com/legacyfs/online/19422_weeklink.gif" width="115" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Fine solution, no problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if I I would like to do this in one go?&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just give your fields the same name ( you don't really want to use these anyway,right?):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;for a = 2011 to 2012&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Weeklnk:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; $(a) &amp;amp; RecNo() &lt;STRONG&gt;as WeeknrKey&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;AutoGenerate(53);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NEXT;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus your tables get auto concatenated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And as already said, just add any number to recno() if you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Aug 2012 21:02:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Change-value-of-field-during-AutoGenerate/m-p/337965#M1169757</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-08-04T21:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: Change value of field during AutoGenerate</title>
      <link>https://community.qlik.com/t5/QlikView/Change-value-of-field-during-AutoGenerate/m-p/337966#M1169758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Swuehl, yes this is the shortest way and that is what I tried to find.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to the posting of Mayil I was also able to find a solution using RowNo() &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let b=0;&lt;/P&gt;&lt;P&gt;for a = 2011 to 2012&lt;/P&gt;&lt;P&gt;Weeklink:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp; $(a) &amp;amp; (RowNo()-$(b)) &lt;SPAN style="font-size: 12px;"&gt;&lt;EM&gt;&lt;STRONG&gt;as WeeknrKey&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;AutoGenerate(53);&lt;/P&gt;&lt;P&gt;b=53;&lt;/P&gt;&lt;P&gt;next;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks both of you, I learned something today &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Aug 2012 21:16:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Change-value-of-field-during-AutoGenerate/m-p/337966#M1169758</guid>
      <dc:creator />
      <dc:date>2012-08-04T21:16:52Z</dc:date>
    </item>
  </channel>
</rss>

