<?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 AW:Using a Variable as a a Field in a Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-a-Variable-as-a-a-Field-in-a-Table/m-p/187000#M50839</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;e.g.:&lt;/P&gt;&lt;P&gt;let var = 5353;&lt;/P&gt;&lt;P&gt;load $(var) as Value ......&lt;/P&gt;&lt;P&gt;Rgds,&lt;BR /&gt;Joachim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Jun 2010 09:27:47 GMT</pubDate>
    <dc:creator>biester</dc:creator>
    <dc:date>2010-06-14T09:27:47Z</dc:date>
    <item>
      <title>Using a Variable as a a Field in a Table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-Variable-as-a-a-Field-in-a-Table/m-p/186999#M50838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to use a variable as a field in one of the tables.&lt;/P&gt;&lt;P&gt;How can I do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jun 2010 09:11:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-Variable-as-a-a-Field-in-a-Table/m-p/186999#M50838</guid>
      <dc:creator />
      <dc:date>2010-06-14T09:11:54Z</dc:date>
    </item>
    <item>
      <title>AW:Using a Variable as a a Field in a Table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-Variable-as-a-a-Field-in-a-Table/m-p/187000#M50839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;e.g.:&lt;/P&gt;&lt;P&gt;let var = 5353;&lt;/P&gt;&lt;P&gt;load $(var) as Value ......&lt;/P&gt;&lt;P&gt;Rgds,&lt;BR /&gt;Joachim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jun 2010 09:27:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-Variable-as-a-a-Field-in-a-Table/m-p/187000#M50839</guid>
      <dc:creator>biester</dc:creator>
      <dc:date>2010-06-14T09:27:47Z</dc:date>
    </item>
    <item>
      <title>AW:Using a Variable as a a Field in a Table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-Variable-as-a-a-Field-in-a-Table/m-p/187001#M50840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually I am using the following For statement Statement&lt;/P&gt;&lt;P&gt;FOR EACH file in filelist('C:\Documents and Settings\*.csv*')&lt;/P&gt;&lt;P&gt;Now when I am loading data from each of the files from the given folder I also want the filename as on of the fields but this attempt is giving me some error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR EACH file in filelist('C:\Documents and Settings\*.csv*')&lt;/P&gt;&lt;P&gt;TEMP:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Field1,&lt;/P&gt;&lt;P&gt;Field2&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[$(file)]&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, embedded labels, delimiter is ',', msq);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;but the following code does not work:&lt;/P&gt;&lt;P&gt;FOR EACH file in filelist('C:\Documents and Settings\*.csv*')&lt;/P&gt;&lt;P&gt;TEMP:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Field1,&lt;/P&gt;&lt;P&gt;Field2,&lt;/P&gt;&lt;P&gt;$(file) as filename&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[$(file)]&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, embedded labels, delimiter is ',', msq);&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jun 2010 10:23:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-Variable-as-a-a-Field-in-a-Table/m-p/187001#M50840</guid>
      <dc:creator />
      <dc:date>2010-06-14T10:23:10Z</dc:date>
    </item>
    <item>
      <title>AW:Using a Variable as a a Field in a Table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-Variable-as-a-a-Field-in-a-Table/m-p/187002#M50841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use a variable as a Field.&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is exactly what I am exactly trying to do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR EACH file in filelist('C:\Documents and Settings\*.csv*') // reads all CSV files in the given folder&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TEMP:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Field1,&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Field2&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;[$(file)]&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, embedded labels, delimiter is ',', msq);&lt;/P&gt;&lt;P&gt;NEXT&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above code works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I also want the the filename as one of the fields and hence I am trying the following code which throws some error.&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR EACH file in filelist('C:\Documents and Settings\*.csv*')&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;TEMP:&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Field1,&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Field2,&lt;/P&gt;&lt;P&gt;&lt;B&gt;$(file) as filename&lt;/B&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;[$(file)]&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, embedded labels, delimiter is ',', msq);&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;NEXT&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know that where I am going wrong and how can I meet my objective of having the file name as one of the fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Rohit&lt;/P&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jun 2010 10:35:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-Variable-as-a-a-Field-in-a-Table/m-p/187002#M50841</guid>
      <dc:creator />
      <dc:date>2010-06-14T10:35:20Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Using a Variable as a a Field in a Table</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-Variable-as-a-a-Field-in-a-Table/m-p/187003#M50842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;'$(file)' as filename&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jun 2010 11:25:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-Variable-as-a-a-Field-in-a-Table/m-p/187003#M50842</guid>
      <dc:creator>biester</dc:creator>
      <dc:date>2010-06-14T11:25:05Z</dc:date>
    </item>
  </channel>
</rss>

