<?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 variables defined in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/variables-defined-in-script/m-p/493431#M693438</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I like to define my variables in script, in case my qvw gets screwed (and I find it more easy to make changes after that).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I define them like this for instance :&lt;/P&gt;&lt;P style="font-size: 9px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;set&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #929292;"&gt;&lt;STRONG&gt;&lt;EM&gt;comite_init&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; = NUM(LEFT(&lt;SPAN style="color: #929292;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(comite)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;,4),'0000')&amp;nbsp;&amp;nbsp; &amp;amp; '01'; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in the case there are $ sign expansions in the variable, qv replace it with the value of the other $() variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do i get to write :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set year_plus_1 = $(this_year) + 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;without qv transforming it into 2013+1&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Jun 2013 14:22:28 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-06-20T14:22:28Z</dc:date>
    <item>
      <title>variables defined in script</title>
      <link>https://community.qlik.com/t5/QlikView/variables-defined-in-script/m-p/493431#M693438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I like to define my variables in script, in case my qvw gets screwed (and I find it more easy to make changes after that).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I define them like this for instance :&lt;/P&gt;&lt;P style="font-size: 9px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0433ff;"&gt;&lt;STRONG&gt;set&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #929292;"&gt;&lt;STRONG&gt;&lt;EM&gt;comite_init&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; = NUM(LEFT(&lt;SPAN style="color: #929292;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(comite)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;,4),'0000')&amp;nbsp;&amp;nbsp; &amp;amp; '01'; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in the case there are $ sign expansions in the variable, qv replace it with the value of the other $() variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do i get to write :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set year_plus_1 = $(this_year) + 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;without qv transforming it into 2013+1&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jun 2013 14:22:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variables-defined-in-script/m-p/493431#M693438</guid>
      <dc:creator />
      <dc:date>2013-06-20T14:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: variables defined in script</title>
      <link>https://community.qlik.com/t5/QlikView/variables-defined-in-script/m-p/493432#M693439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set year_plus_1 = @(this_year) + 1;&lt;/P&gt;&lt;P&gt;let year_plus_1 = replace(year_plus_1,'@','$');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or simply like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let year_plus_1 = '$' &amp;amp; '(this_year) + 1';&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jun 2013 18:49:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variables-defined-in-script/m-p/493432#M693439</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-06-20T18:49:07Z</dc:date>
    </item>
  </channel>
</rss>

