<?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 Setting a Variable in &amp;quot;LOAD&amp;quot; in Scripts in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Setting-a-Variable-in-quot-LOAD-quot-in-Scripts/m-p/468030#M699427</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;My data sources change monthly, and all are excel files with "YY-MM" at the end of the file name, so to make it easier to change those references, I'd like to set two variables, like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set FilePath='C:/Path' //Just an example&lt;/P&gt;&lt;P&gt;Set Ref='AA-MM' //With YY being current year and MM last month, i.e.: 12-11&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd then use this variables in LOAD field of my sources, like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Example]:&lt;/P&gt;&lt;P&gt;LOAD Data1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data2&lt;/P&gt;&lt;P&gt;FROM &lt;STRONG&gt;FilePath&lt;/STRONG&gt;&amp;amp;'FileName'&amp;amp;&lt;STRONG&gt;Ref&lt;/STRONG&gt;&amp;amp;'.xls' (&lt;SPAN style="color: #333333; font-size: 10pt;"&gt;ooxml, embedded labels, header is 1 lines, table is DATA);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 10pt;"&gt;Instead of:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Example2]:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 10pt;"&gt;LOAD Data, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 10pt;"&gt;FROM &lt;C&gt;&lt;BR /&gt;(biff, embedded labels, header is 1 lines, table is DATA); &lt;/C&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;However, this does not seem to work, as Qlikview searches for the root folder of my .qvw file first instead of going to FilePath. Is there any way to do this?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Dec 2012 12:22:27 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-12-27T12:22:27Z</dc:date>
    <item>
      <title>Setting a Variable in "LOAD" in Scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-a-Variable-in-quot-LOAD-quot-in-Scripts/m-p/468030#M699427</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;My data sources change monthly, and all are excel files with "YY-MM" at the end of the file name, so to make it easier to change those references, I'd like to set two variables, like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set FilePath='C:/Path' //Just an example&lt;/P&gt;&lt;P&gt;Set Ref='AA-MM' //With YY being current year and MM last month, i.e.: 12-11&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd then use this variables in LOAD field of my sources, like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Example]:&lt;/P&gt;&lt;P&gt;LOAD Data1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data2&lt;/P&gt;&lt;P&gt;FROM &lt;STRONG&gt;FilePath&lt;/STRONG&gt;&amp;amp;'FileName'&amp;amp;&lt;STRONG&gt;Ref&lt;/STRONG&gt;&amp;amp;'.xls' (&lt;SPAN style="color: #333333; font-size: 10pt;"&gt;ooxml, embedded labels, header is 1 lines, table is DATA);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 10pt;"&gt;Instead of:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Example2]:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 10pt;"&gt;LOAD Data, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 10pt;"&gt;FROM &lt;C&gt;&lt;BR /&gt;(biff, embedded labels, header is 1 lines, table is DATA); &lt;/C&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;However, this does not seem to work, as Qlikview searches for the root folder of my .qvw file first instead of going to FilePath. Is there any way to do this?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Dec 2012 12:22:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-a-Variable-in-quot-LOAD-quot-in-Scripts/m-p/468030#M699427</guid>
      <dc:creator />
      <dc:date>2012-12-27T12:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Setting a Variable in "LOAD" in Scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-a-Variable-in-quot-LOAD-quot-in-Scripts/m-p/468031#M699428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;FROM &lt;STRONG style="color: #0000ff;"&gt;$(FilePath)&lt;/STRONG&gt;&amp;amp;'FileName'&amp;amp;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;$(Ref)&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;amp;'.xls' &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Dec 2012 12:36:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-a-Variable-in-quot-LOAD-quot-in-Scripts/m-p/468031#M699428</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-12-27T12:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: Setting a Variable in "LOAD" in Scripts</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-a-Variable-in-quot-LOAD-quot-in-Scripts/m-p/468032#M699429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It complained about the &amp;amp; and ' ', but it worked:&lt;/P&gt;&lt;P&gt;FROM &lt;STRONG style="color: #0000ff;"&gt;$(FilePath)&lt;/STRONG&gt;FileName&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;$(Ref)&lt;/STRONG&gt;&lt;/SPAN&gt;.xls&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everytime I use a variable, u must use it inside $()?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Dec 2012 13:11:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-a-Variable-in-quot-LOAD-quot-in-Scripts/m-p/468032#M699429</guid>
      <dc:creator />
      <dc:date>2012-12-27T13:11:45Z</dc:date>
    </item>
  </channel>
</rss>

