<?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 Find the latest file and load it in the script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Find-the-latest-file-and-load-it-in-the-script/m-p/1767342#M719129</link>
    <description>&lt;P&gt;I have files in a folder, in the format below&lt;/P&gt;&lt;P&gt;20201207_05_31_06AM_Report.xls&lt;/P&gt;&lt;P&gt;20201208_13_31_06AM_Report.xls&lt;/P&gt;&lt;P&gt;20201209_17_56_31AM_Report.xls&lt;/P&gt;&lt;P&gt;20201209_22_31_15PM_Report.xls&lt;/P&gt;&lt;P&gt;The first characters are&amp;nbsp;20201207 in YYYYMMDD format while the latter ones are in HH_MM_SS&amp;nbsp; with AM or PM&lt;/P&gt;&lt;P&gt;How do I load data from .XLS in my script? In this case, it should be 20201209_22_31_15PM_Report.xls as that is the latest.&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 23:28:55 GMT</pubDate>
    <dc:creator>qlikwiz123</dc:creator>
    <dc:date>2024-11-15T23:28:55Z</dc:date>
    <item>
      <title>Find the latest file and load it in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Find-the-latest-file-and-load-it-in-the-script/m-p/1767342#M719129</link>
      <description>&lt;P&gt;I have files in a folder, in the format below&lt;/P&gt;&lt;P&gt;20201207_05_31_06AM_Report.xls&lt;/P&gt;&lt;P&gt;20201208_13_31_06AM_Report.xls&lt;/P&gt;&lt;P&gt;20201209_17_56_31AM_Report.xls&lt;/P&gt;&lt;P&gt;20201209_22_31_15PM_Report.xls&lt;/P&gt;&lt;P&gt;The first characters are&amp;nbsp;20201207 in YYYYMMDD format while the latter ones are in HH_MM_SS&amp;nbsp; with AM or PM&lt;/P&gt;&lt;P&gt;How do I load data from .XLS in my script? In this case, it should be 20201209_22_31_15PM_Report.xls as that is the latest.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:28:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-the-latest-file-and-load-it-in-the-script/m-p/1767342#M719129</guid>
      <dc:creator>qlikwiz123</dc:creator>
      <dc:date>2024-11-15T23:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: Find the latest file and load it in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Find-the-latest-file-and-load-it-in-the-script/m-p/1767349#M719130</link>
      <description>You can use first a FOR EACH file IN filelist ... NEXT loop and a string function to extract the date, then take the highest value from the list, then load the file.&lt;BR /&gt;I'm thinking something along the lines of&lt;BR /&gt;KeepChar(Mid(filenamehere, 1, Index(filenamehere, '_', -1)), '0123456789')&lt;BR /&gt;Then&lt;BR /&gt;LOAD Max(Value) AS FileToLoad RESIDENT ListOfFiles;&lt;BR /&gt;LET vFileToLoad = FieldValue('FileToLoad', 1);&lt;BR /&gt;LatestReport:&lt;BR /&gt;LOAD *&lt;BR /&gt;FROM $(vFileToLoad);&lt;BR /&gt;&lt;BR /&gt;More on&lt;BR /&gt;- For Each: &lt;A href="https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptControlStatements/For%20Each.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptControlStatements/For%20Each.htm&lt;/A&gt;&lt;BR /&gt;- String functions: &lt;A href="https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/StringFunctions/string-functions.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/StringFunctions/string-functions.htm&lt;/A&gt;&lt;BR /&gt;- FieldValue: &lt;A href="https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/InterRecordFunctions/FieldValue.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/InterRecordFunctions/FieldValue.htm&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Dec 2020 14:45:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-the-latest-file-and-load-it-in-the-script/m-p/1767349#M719130</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2020-12-09T14:45:15Z</dc:date>
    </item>
  </channel>
</rss>

