<?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 Help with using a parameter in Load Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323589#M710913</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;&amp;nbsp;&amp;nbsp; I have answered the related question on this post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;A _jive_internal="true" href="https://community.qlik.com/message/126205#126205"&gt;http://community.qlik.com/message/126205#126205&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Jun 2011 09:54:02 GMT</pubDate>
    <dc:creator>kaushiknsolanki</dc:creator>
    <dc:date>2011-06-27T09:54:02Z</dc:date>
    <item>
      <title>Help with using a parameter in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323588#M710912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an application that runs weekly and I am trying to automate qvd creations and reloads.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My scenario:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have weekly text file that are run over the weekend and are stored as text files. My file names will always be of the form FileName_DDMMMYYYY for every week. For example week 1 will be 03Jun2011, week 2 will be 10Jun2011, week 3 will be 17Jun2011.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to create some kind of dynamic variable in my load script to cater for this changing weekly date value, so that I do not have to hardcode my script always.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment I have come up with &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let weekdate = date(today() -2, 'DDMMMYYYY'); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let week1 = 'FileName_$(weekdate)'; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let j=1; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TableName: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load ........ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From &lt;D&gt; &lt;/D&gt;&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;The solution I have is not flexible enough and will only work if I run my automation piece on a monday but not on any other day as the dates change making the file name wrong. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please help me out to get this working? Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 09:00:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323588#M710912</guid>
      <dc:creator />
      <dc:date>2011-06-27T09:00:43Z</dc:date>
    </item>
    <item>
      <title>Help with using a parameter in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323589#M710913</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;&amp;nbsp;&amp;nbsp; I have answered the related question on this post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;A _jive_internal="true" href="https://community.qlik.com/message/126205#126205"&gt;http://community.qlik.com/message/126205#126205&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 09:54:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323589#M710913</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2011-06-27T09:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help with using a parameter in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323590#M710914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kaushik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your code is amazing, but I need yourhelp to get it working for just one file in a directory.&lt;/P&gt;&lt;P&gt;I don't want it to look at sub directories at all. I tried making some changes but then the code kept on falling over, because I don't know anything about the kind of scripting you are doing as I am relatively new to scripting in QlikView&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please just guide me to make it work by eliminating the For loops so that it just looks for only one file and does not look at sub directories but only the main directory specified. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub DoDir (Root)&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;For Each Ext In 'csv' // filetype to search for in current directory&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;For Each File In FileList (Root &amp;amp; '\MYFILENAME*.' &amp;amp; Ext)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Files:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Load '$(File)' as Name,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;FileTime('$(File)') as FileTime,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;RangeSum(Peek('FileCount'), 1) as FileCount&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Autogenerate 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next File&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next Ext&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Each Dir In DirList (Root &amp;amp; '\*') // search in sundirectories&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call DoDir (Dir)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next Dir End Sub Call DoDir ('C:\MYFOLDER'); // Starting point &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MostRecentFileName: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIRST 1 LOAD Name AS MostRecentFileName&lt;/P&gt;&lt;P&gt;RESIDENT Files ORDER BY FileTime DESC; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vFileToLoad = FieldValueCount('MostRecentFileName'); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for each file in FieldValueList('MostRecentFileName') &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TableName: LOAD ...................&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM $(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;store TableName into [C\$(file).qvd]; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//next file &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE MostRecentFileName,Files;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 11:21:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323590#M710914</guid>
      <dc:creator />
      <dc:date>2011-06-27T11:21:00Z</dc:date>
    </item>
    <item>
      <title>Help with using a parameter in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323591#M710915</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Just delete this pat of code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each Dir In DirList (Root &amp;amp; '\*') // search in sundirectories &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Call DoDir (Dir) &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next Dir &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 11:26:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323591#M710915</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2011-06-27T11:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: Help with using a parameter in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323592#M710916</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;Without the need of that macro, and provided all CSV files are in the same folder you can improve the load performance and do just&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;FROM C:\Folder\FileName*.txt (options and delimiters here);&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The "*" is valid as a name and it will work within the folder specified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 11:38:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323592#M710916</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-06-27T11:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Help with using a parameter in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323593#M710917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kaushik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although all code that is posted in the Community is free to use and modify, please refer to the &lt;A _jive_internal="true" href="https://community.qlik.com/message/17774"&gt;actual sources&lt;/A&gt; when you provide code to other people. That's the best way to improve the code if needed and check the bugs it may contain and keep the best possible solution in place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 11:42:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323593#M710917</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-06-27T11:42:59Z</dc:date>
    </item>
    <item>
      <title>Help with using a parameter in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323594#M710918</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;&amp;nbsp;&amp;nbsp; Miquel is you look at the code i have provided, you will see that i have provided the same code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; By the way thanks for suggession.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 11:48:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323594#M710918</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2011-06-27T11:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: Help with using a parameter in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323595#M710919</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;Ellaborating a bit further my code above, the following should work fine without needs of macro or loops, and likely improving performance in the loading process&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;LET vLastDate = Date(Today(), 'YYYYMMDD'); // variable with the date you want to start loading&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;LOAD Field1&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;file*.txt // filename&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, embedded labels, delimiter is '\t', msq)&lt;/P&gt;&lt;P&gt;WHERE Date(Right(FileBaseName(), 8)) &amp;gt;= '$(vLastDate)';&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.grupocomex.com"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 12:09:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323595#M710919</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-06-27T12:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help with using a parameter in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323596#M710920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for you help Miguel. My directory contains multiple files, but I only want to load the file for the most recent date alone, that is why i have avoided using the *.&lt;/P&gt;&lt;P&gt;I tried your code above as I am aiming to avoid using macros and loops if possible, but because of the * it picked up other files with the dates I do not want, as I only want to load the file which has the newest info alone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 12:52:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323596#M710920</guid>
      <dc:creator />
      <dc:date>2011-06-27T12:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: Help with using a parameter in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323597#M710921</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;Then something like the following may do the trick&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;DatesOfFiles:&lt;/P&gt;&lt;P&gt;LOAD MaxString(Right(FileBaseName(), 8)) AS PossibleDates&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;file*.txt&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, embedded labels, delimiter is '\t', msq);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vLastDate = Peek('PossibleDates', -1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE DatesOfFiles;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LastDataFile:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;FROM file$(vLastDate).txt&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, embedded labels, delimiter is '\t', msq);&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although my guess is it does, I don't know whether this would load faster than the macro one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 13:11:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323597#M710921</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-06-27T13:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: Help with using a parameter in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323598#M710922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks a lot for everything &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 14:17:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323598#M710922</guid>
      <dc:creator />
      <dc:date>2011-06-27T14:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: Help with using a parameter in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323599#M710923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great! You're welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But do not dismiss &lt;A _jive_internal="true" href="https://community.qlik.com/people/kaushik.solanki"&gt;Kaushik Solanki&lt;/A&gt;'s suggestion. Specially if you have a lot of files to read. If you test both, please let us know how did they performed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 14:42:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-using-a-parameter-in-Load-Script/m-p/323599#M710923</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-06-27T14:42:35Z</dc:date>
    </item>
  </channel>
</rss>

