<?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 QVD Filtering in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/QVD-Filtering/m-p/176428#M44438</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi there&lt;/P&gt;&lt;P&gt;the problem is that the function you are using "filenam()" can only be used inside load statement as it returns the name of the file currently been read.&lt;/P&gt;&lt;P&gt;since your using it before the load statement , it is empty hence you get the rest of the script in error.&lt;/P&gt;&lt;P&gt;what you need to do is extract the file name with out the path from the variable "qvdFile" that is used in the "for each" loop&lt;/P&gt;&lt;P&gt;you can use it like this:&lt;/P&gt;&lt;P&gt;replace this line in your code:&lt;/P&gt;&lt;PRE style="margin:0px;"&gt;LET vFileName = FileName('$(qvdFile)');&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;with this line&lt;/PRE&gt;&lt;PRE style="margin:0px;"&gt;LET vFileName = right('$(qvdFile)',len('$(qvdFile)')-index('$(qvdFile)','\',-1))&lt;BR /&gt;&lt;BR /&gt;i think this should do the trick&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 06 Jun 2010 11:18:40 GMT</pubDate>
    <dc:creator>wizardo</dc:creator>
    <dc:date>2010-06-06T11:18:40Z</dc:date>
    <item>
      <title>QVD Filtering</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-Filtering/m-p/176427#M44437</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;as a complement to the post "http://community.qlik.com/forums/p/29947/115092.aspx#", i would like to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;FOR each qvdFile in filelist ('*.qvd')&lt;BR /&gt;&lt;BR /&gt; LET vFileName = FileName('$(qvdFile)');&lt;BR /&gt; '$(vFileName)':&lt;BR /&gt; LOAD ID,&lt;BR /&gt; DATE(DATE) as DATE,&lt;BR /&gt; [HEURE DEB],&lt;BR /&gt; [HEURE DEB1],&lt;BR /&gt; PTF,&lt;BR /&gt; HOST,&lt;BR /&gt; [TRAP ID],&lt;BR /&gt; TYPE,&lt;BR /&gt; NIV,&lt;BR /&gt; MESSAGE&lt;BR /&gt; FROM&lt;BR /&gt; $(qvdFile)(qvd)&lt;BR /&gt; WHERE NIV='ERROR' OR NIV='FATAL';&lt;BR /&gt;&lt;BR /&gt; STORE $(vFileName) INTO $(vFileName)_mod.qvd (qvd);&lt;BR /&gt;NEXT qvdFile;&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-1735_sourceID:1735" /&gt;&lt;/P&gt;&lt;P&gt;The issue is that i get errors while loading....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the DEBUG mode, i discover the "LET vFileName = FileName('$(qvdFile)');" that vFileName has as value "",&lt;BR /&gt;which seems to trigger the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jun 2010 14:47:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-Filtering/m-p/176427#M44437</guid>
      <dc:creator />
      <dc:date>2010-06-04T14:47:56Z</dc:date>
    </item>
    <item>
      <title>QVD Filtering</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-Filtering/m-p/176428#M44438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi there&lt;/P&gt;&lt;P&gt;the problem is that the function you are using "filenam()" can only be used inside load statement as it returns the name of the file currently been read.&lt;/P&gt;&lt;P&gt;since your using it before the load statement , it is empty hence you get the rest of the script in error.&lt;/P&gt;&lt;P&gt;what you need to do is extract the file name with out the path from the variable "qvdFile" that is used in the "for each" loop&lt;/P&gt;&lt;P&gt;you can use it like this:&lt;/P&gt;&lt;P&gt;replace this line in your code:&lt;/P&gt;&lt;PRE style="margin:0px;"&gt;LET vFileName = FileName('$(qvdFile)');&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;with this line&lt;/PRE&gt;&lt;PRE style="margin:0px;"&gt;LET vFileName = right('$(qvdFile)',len('$(qvdFile)')-index('$(qvdFile)','\',-1))&lt;BR /&gt;&lt;BR /&gt;i think this should do the trick&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Jun 2010 11:18:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-Filtering/m-p/176428#M44438</guid>
      <dc:creator>wizardo</dc:creator>
      <dc:date>2010-06-06T11:18:40Z</dc:date>
    </item>
    <item>
      <title>QVD Filtering</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-Filtering/m-p/176429#M44439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks wizardo, I was looking to do the same and have successfully applied your advice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2011 16:09:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-Filtering/m-p/176429#M44439</guid>
      <dc:creator />
      <dc:date>2011-09-26T16:09:21Z</dc:date>
    </item>
  </channel>
</rss>

