<?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 How do I use constants in a load script? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-do-I-use-constants-in-a-load-script/m-p/657371#M240002</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a load script where I use the same value in multiple places. It is a date in the format YYYYMM so 201408 in the example below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD text(City) as City, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text(State) as State&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, embedded labels, delimiter is '\t');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want to do is to declare a variable called monthDate that is equal to 201408. Then I want to use that variable in place of 201408 throughout my load script. This way I only have to change the date in one place than in many. Is it possible to do this? Ideally it would something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;monthDate = 201408&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD text(City) as City, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text(State) as State&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, embedded labels, delimiter is '\t');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Sep 2014 14:25:25 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-09-09T14:25:25Z</dc:date>
    <item>
      <title>How do I use constants in a load script?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-use-constants-in-a-load-script/m-p/657371#M240002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a load script where I use the same value in multiple places. It is a date in the format YYYYMM so 201408 in the example below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD text(City) as City, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text(State) as State&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, embedded labels, delimiter is '\t');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want to do is to declare a variable called monthDate that is equal to 201408. Then I want to use that variable in place of 201408 throughout my load script. This way I only have to change the date in one place than in many. Is it possible to do this? Ideally it would something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;monthDate = 201408&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD text(City) as City, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text(State) as State&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, embedded labels, delimiter is '\t');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 14:25:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-use-constants-in-a-load-script/m-p/657371#M240002</guid>
      <dc:creator />
      <dc:date>2014-09-09T14:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use constants in a load script?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-use-constants-in-a-load-script/m-p/657372#M240003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SET monthDate = 201408;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD text(City) as City,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text(State) as State&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(txt, codepage is 1252, embedded labels, delimiter is '\t');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 14:28:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-use-constants-in-a-load-script/m-p/657372#M240003</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-09-09T14:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use constants in a load script?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-use-constants-in-a-load-script/m-p/657373#M240004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Create monthDate as a variable using SET. Then reference it in your script as $(monthDate).&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;-Rob&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SET monthDate = 201408;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD text(City) as City,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; text(State) as State&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FROM&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;C&gt;&lt;/C&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;(txt, codepage is 1252, embedded labels, delimiter is '\t');&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 14:28:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-use-constants-in-a-load-script/m-p/657373#M240004</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2014-09-09T14:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use constants in a load script?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-use-constants-in-a-load-script/m-p/657374#M240005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! I knew there had to be a way, but was unsure of the syntax.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 14:30:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-use-constants-in-a-load-script/m-p/657374#M240005</guid>
      <dc:creator />
      <dc:date>2014-09-09T14:30:34Z</dc:date>
    </item>
  </channel>
</rss>

