<?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: Editing Variables on the loading script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Editing-Variables-on-the-loading-script/m-p/874084#M305319</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe you can't change the variable in the loading script (well, maybe using a Macro...).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But maybe you can do similar using Peek(), something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Let vVar = 1000;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD Field,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; if(recno()=1, $(vVar), peek(Var2)) as Var,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; if(recno()=1, Rangesum($(vVar),Field), Rangesum(peek(Var2),Field)) as Var2;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD * INLINE [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Field&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;3&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;5&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;7&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;-1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Jul 2015 22:11:44 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2015-07-14T22:11:44Z</dc:date>
    <item>
      <title>Editing Variables on the loading script</title>
      <link>https://community.qlik.com/t5/QlikView/Editing-Variables-on-the-loading-script/m-p/874083#M305318</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;I was wondering if there is a way to edit the value of the variable on the loading script on qlikview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variable:&lt;/P&gt;&lt;P&gt;temp=1000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(temp) as F2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Here i would like to do temp = temp + 3 or temp = temp+8 depending on some other fields)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(temp) as F3, (in here i would use the new temp value to a new field)&lt;/P&gt;&lt;P&gt;From&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;The thing is i would like the variable to keep his new value for every new row of the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem above was to avoid explaining a more real and time consuming issue, but if i found out how to that variable value change on the loading script i would be set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks alot guys,&lt;/P&gt;&lt;P&gt;KR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 21:55:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Editing-Variables-on-the-loading-script/m-p/874083#M305318</guid>
      <dc:creator />
      <dc:date>2015-07-14T21:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: Editing Variables on the loading script</title>
      <link>https://community.qlik.com/t5/QlikView/Editing-Variables-on-the-loading-script/m-p/874084#M305319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe you can't change the variable in the loading script (well, maybe using a Macro...).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But maybe you can do similar using Peek(), something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Let vVar = 1000;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD Field,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; if(recno()=1, $(vVar), peek(Var2)) as Var,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; if(recno()=1, Rangesum($(vVar),Field), Rangesum(peek(Var2),Field)) as Var2;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD * INLINE [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Field&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;3&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;5&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;7&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;-1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 22:11:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Editing-Variables-on-the-loading-script/m-p/874084#M305319</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-07-14T22:11:44Z</dc:date>
    </item>
  </channel>
</rss>

