<?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: Use variable for fieldnames in loadscript in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Use-variable-for-fieldnames-in-loadscript/m-p/702324#M673819</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Richard&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try the below variables in the load script&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Let &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vThisYear&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Today&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;());&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Let&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vPreviousYear&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Today&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;())-1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thanks and regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Padma&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 03 Aug 2014 05:36:08 GMT</pubDate>
    <dc:creator>qlikoqlik</dc:creator>
    <dc:date>2014-08-03T05:36:08Z</dc:date>
    <item>
      <title>Use variable for fieldnames in loadscript</title>
      <link>https://community.qlik.com/t5/QlikView/Use-variable-for-fieldnames-in-loadscript/m-p/702321#M673816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my excel sheet if have columns with as name the year (2014,2013,2012, etc)&lt;/P&gt;&lt;P&gt;In the load script i have a calculated field where i use last (2014) and the previous year (2013).&lt;/P&gt;&lt;P&gt;Next year I need to use the columns 2015 and 2014.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I want to create a variable vLastYear and vPrevYear so I can use these in stead of hard coded data. So I only have to change the content of the 2 variables vLastYear and vPrevYear.&lt;/P&gt;&lt;P&gt;&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; ....&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If( ([2014] &amp;gt; [2013]) ,Chr(9660), Chr(9650) ) As Direction&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .....&lt;/P&gt;&lt;P&gt;Resident TableName;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions ??&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Aug 2014 14:21:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-variable-for-fieldnames-in-loadscript/m-p/702321#M673816</guid>
      <dc:creator>r_vdbraak</dc:creator>
      <dc:date>2014-08-02T14:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: Use variable for fieldnames in loadscript</title>
      <link>https://community.qlik.com/t5/QlikView/Use-variable-for-fieldnames-in-loadscript/m-p/702322#M673817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Richard,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I were you I'd probably load the data in using a crosstable. Then, if you use a resident load on the data, ordering by your key fields, and year, you can do your comparisons by using the peek command rather than having to refer to field names that will change year on year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Aug 2014 14:49:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-variable-for-fieldnames-in-loadscript/m-p/702322#M673817</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2014-08-02T14:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Use variable for fieldnames in loadscript</title>
      <link>https://community.qlik.com/t5/QlikView/Use-variable-for-fieldnames-in-loadscript/m-p/702323#M673818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so far.&lt;/P&gt;&lt;P&gt;I'm trying it and see if I can use the Peek.&lt;/P&gt;&lt;P&gt;I never used it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Aug 2014 14:57:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-variable-for-fieldnames-in-loadscript/m-p/702323#M673818</guid>
      <dc:creator>r_vdbraak</dc:creator>
      <dc:date>2014-08-02T14:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Use variable for fieldnames in loadscript</title>
      <link>https://community.qlik.com/t5/QlikView/Use-variable-for-fieldnames-in-loadscript/m-p/702324#M673819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Richard&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try the below variables in the load script&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Let &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vThisYear&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Today&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;());&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Let&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vPreviousYear&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Today&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;())-1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thanks and regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Padma&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Aug 2014 05:36:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-variable-for-fieldnames-in-loadscript/m-p/702324#M673819</guid>
      <dc:creator>qlikoqlik</dc:creator>
      <dc:date>2014-08-03T05:36:08Z</dc:date>
    </item>
  </channel>
</rss>

