<?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: How do you load a variable value as a field value in the load statement? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-do-you-load-a-variable-value-as-a-field-value-in-the-load/m-p/550119#M205464</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just add quotes&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;field1,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;field2,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Left(Right(Text('$(file)'), 10), 2) as F_Month,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Left(Right(Text('$(file)'), 8), 4) as F_Year&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;From [$(file)]&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(biff, embedded labels, table is Sheet1$);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;NEXT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Aug 2013 19:41:04 GMT</pubDate>
    <dc:creator>Clever_Anjos</dc:creator>
    <dc:date>2013-08-29T19:41:04Z</dc:date>
    <item>
      <title>How do you load a variable value as a field value in the load statement?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-load-a-variable-value-as-a-field-value-in-the-load/m-p/550118#M205463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have multiple files (.xls) in a folder that I pull data from (e.g. File012013.xls, File022013.xls, File032013.xls, etc)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you would guess, when I pull data from these file in a loop, I would like to use the numeric part of the file to use populate the month and the year field in the load statement. My code is below. I'm getting an error stating that it cannot find the field name &amp;lt;File012013.xls&amp;gt; when loading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;LOAD * Inline &lt;/P&gt;&lt;P&gt;[field1,field2, F_Month, F_Year];&lt;/P&gt;&lt;P&gt;FOR Each file in FileList('$(vSourcedirectory)File*.xls')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate(Table1)&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;Left(Right(Text($(file)), 10), 2) as F_Month,&lt;/P&gt;&lt;P&gt;Left(Right(Text($(file)), 8), 4) as F_Year&lt;/P&gt;&lt;P&gt;From [$(file)]&lt;/P&gt;&lt;P&gt;(biff, embedded labels, table is Sheet1$); &lt;/P&gt;&lt;P&gt;NEXT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On another note, I get similar message when I try to put a declared variable as a Text($(var)) as SomeField, I get similar message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated. Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Aug 2013 19:24:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-load-a-variable-value-as-a-field-value-in-the-load/m-p/550118#M205463</guid>
      <dc:creator />
      <dc:date>2013-08-29T19:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do you load a variable value as a field value in the load statement?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-load-a-variable-value-as-a-field-value-in-the-load/m-p/550119#M205464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just add quotes&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;field1,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;field2,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Left(Right(Text('$(file)'), 10), 2) as F_Month,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Left(Right(Text('$(file)'), 8), 4) as F_Year&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;From [$(file)]&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(biff, embedded labels, table is Sheet1$);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;NEXT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Aug 2013 19:41:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-load-a-variable-value-as-a-field-value-in-the-load/m-p/550119#M205464</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2013-08-29T19:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do you load a variable value as a field value in the load statement?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-load-a-variable-value-as-a-field-value-in-the-load/m-p/550120#M205465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for quick response. This was driving me crazy!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Aug 2013 19:56:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-load-a-variable-value-as-a-field-value-in-the-load/m-p/550120#M205465</guid>
      <dc:creator />
      <dc:date>2013-08-29T19:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do you load a variable value as a field value in the load statement?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-load-a-variable-value-as-a-field-value-in-the-load/m-p/550121#M205466</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;Hi.&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;You should add quotes, since dollar-sign expantion just replaces exactly $(file) with a file name.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Left(Right(Text(&lt;STRONG&gt;'&lt;/STRONG&gt;$(file)&lt;STRONG&gt;'&lt;/STRONG&gt;), 10), 2) as F_Month,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Left(Right(Text(&lt;STRONG&gt;'&lt;/STRONG&gt;$(file)&lt;STRONG&gt;'&lt;/STRONG&gt;), 8), 4) as F_Year&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Aug 2013 20:03:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-load-a-variable-value-as-a-field-value-in-the-load/m-p/550121#M205466</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2013-08-29T20:03:17Z</dc:date>
    </item>
  </channel>
</rss>

