<?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 Load a file with a MaxDate in Qlik Automate</title>
    <link>https://community.qlik.com/t5/Qlik-Automate/Load-a-file-with-a-MaxDate/m-p/2425398#M3225</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I have multiple files stocked in a repository by date, for example we have the files : 20240226_XXX and 20240224_XXX ...&lt;BR /&gt;But in the same repository I have multiple other files with different names, for example : 20240224_YYY&lt;BR /&gt;&lt;BR /&gt;I want to load the file XXX with the most recent date in my qliksense app.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Feb 2024 15:39:48 GMT</pubDate>
    <dc:creator>clarachac</dc:creator>
    <dc:date>2024-02-29T15:39:48Z</dc:date>
    <item>
      <title>Load a file with a MaxDate</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Load-a-file-with-a-MaxDate/m-p/2425398#M3225</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I have multiple files stocked in a repository by date, for example we have the files : 20240226_XXX and 20240224_XXX ...&lt;BR /&gt;But in the same repository I have multiple other files with different names, for example : 20240224_YYY&lt;BR /&gt;&lt;BR /&gt;I want to load the file XXX with the most recent date in my qliksense app.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 15:39:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Load-a-file-with-a-MaxDate/m-p/2425398#M3225</guid>
      <dc:creator>clarachac</dc:creator>
      <dc:date>2024-02-29T15:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: Load a file with a MaxDate</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Load-a-file-with-a-MaxDate/m-p/2425432#M3226</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/261034"&gt;@clarachac&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;There are multiple solutions for this problem and without knowing exactly what you have is hard to give you the best solution. However, I can point you to a good direction.&lt;/P&gt;
&lt;P&gt;You can use * character to load files with a common name pattern.&lt;BR /&gt;In your case, if the files are QVDs:&lt;BR /&gt;LOAD * FROM [*_XXX.qvd](qvd);&lt;/P&gt;
&lt;P&gt;This will combine all files where the name ends with "_XXX.qvd".&lt;/P&gt;
&lt;P&gt;Now, if you are looking to get ONLY the most recent file (the latest) with that name pattern, then you can do something like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV&gt;For Each vFilename in FileList('lib://MyLib/*_XXX.qvd')&lt;/DIV&gt;
&lt;DIV&gt;// Do nothing here&lt;BR /&gt;Next vFilename&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;LOAD * FROM [$(vFilename)](qvd); // The loop will return your latest listed file&lt;/DIV&gt;</description>
      <pubDate>Thu, 29 Feb 2024 15:54:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Load-a-file-with-a-MaxDate/m-p/2425432#M3226</guid>
      <dc:creator>marksouzacosta</dc:creator>
      <dc:date>2024-02-29T15:54:50Z</dc:date>
    </item>
  </channel>
</rss>

