<?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: Replace QVD file if new data published in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Replace-QVD-file-if-new-data-published/m-p/1136254#M917674</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The basic idea would be to iterate over all QVDs, parse the QVD file name, construct the corresponding Excel file name and compare the file times:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FOR EACH vQVDFile IN FILELIST(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;'$(RootDir_FACT)monthlysummary_DEPT_*_$(v_File_Folder).qvd')&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Let vFileTemp = Textbetween( '$(vFile)','monthlysummary_','.');&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Let vLocation = Subfield('$(vFileTemp)','_',3);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Let vYearMonth = Subfield('$(vFileTemp)','_',2);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Set vExcelFile&amp;nbsp; = $(vYearMonth)_monthlysummary.xlsx;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Let vFileTimeCompare = FileTime('$(vQVDFile)') &amp;lt; FileTime('(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;$(RootDir_Data_Location_DEPT)&lt;/SPAN&gt;$(vExcelFile)');&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// Now do your work based on the comparison:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;IF vFileTimeCompare THEN&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;END IF&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NEXT vFile&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 May 2016 15:10:53 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-05-13T15:10:53Z</dc:date>
    <item>
      <title>Replace QVD file if new data published</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-QVD-file-if-new-data-published/m-p/1136251#M917671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have made a QVD maker that creates QVDs every time a new XLSX file appears in a folder. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It follows this logic : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF(isNull(qvdCreateTime('$(RootDir_FACT)monthlysummary_DEPT_$(v_File_HoroDate)_$(v_File_Folder).qvd'))) THEN&lt;/P&gt;&lt;P&gt;LOAD New file&lt;/P&gt;&lt;P&gt;STORE into QVD &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far this process works fine and I have a list of QVDs with the following format ' monthlysummary_DEPT_YYYYMM_Location.qvd'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, when one already created QVD file has to be changed (data errors etc) the only way is to delete all my QVDs and refresh the application. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The logic to prevent this step and a manual refresh is pretty simple : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF my QVD FileTime is &amp;lt; my XLSX FileTime then replace my old QVD file with a new one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF (alt(FileTime('$(RootDir_FACT)monthlysummary_DEPT_*_$(v_File_Folder).qvd') &amp;lt; FileTime('$(RootDir_Data_Location_DEPT)*monthlysummary.xlsx'))) THEN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now that formula doesn’t work because I am using wild card ‘ * ‘ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each QVD file there is a XLSX file related. Now, those files don’t have the same names and format, that makes it difficult to compare them. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea how should I proceed ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-QVD-file-if-new-data-published/m-p/1136251#M917671</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Replace QVD file if new data published</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-QVD-file-if-new-data-published/m-p/1136252#M917672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may want to look into&amp;nbsp; a FOR EACH vFile IN FILELIST('Path') ... NEXT vFile &lt;/P&gt;&lt;P&gt;loop to iterate over your qvds / excel files (I think QVD filenames could be derived from Excel file names, right?) and compare the file times:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/ScriptControlStatements/For%20Each.htm?q=filelist" title="http://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/ScriptControlStatements/For%20Each.htm?q=filelist"&gt;For each..next ‒ QlikView&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2016 21:10:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-QVD-file-if-new-data-published/m-p/1136252#M917672</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-12T21:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: Replace QVD file if new data published</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-QVD-file-if-new-data-published/m-p/1136253#M917673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your answer Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand the first part, not sure I know how I can compare my excel files and QVDs filetime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is how they look like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QVD : monthlysummary_vDEPT_YYYYMM_Location.qvd&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [with this path before ('$(RootDir_FACT)]&lt;/P&gt;&lt;P&gt;EXCEL : YYYYMM_monhtlysummary.xlsx&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [with this path before ('$(RootDir_Data_Location_vDEPT)]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2016 13:06:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-QVD-file-if-new-data-published/m-p/1136253#M917673</guid>
      <dc:creator />
      <dc:date>2016-05-13T13:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Replace QVD file if new data published</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-QVD-file-if-new-data-published/m-p/1136254#M917674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The basic idea would be to iterate over all QVDs, parse the QVD file name, construct the corresponding Excel file name and compare the file times:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FOR EACH vQVDFile IN FILELIST(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;'$(RootDir_FACT)monthlysummary_DEPT_*_$(v_File_Folder).qvd')&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Let vFileTemp = Textbetween( '$(vFile)','monthlysummary_','.');&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Let vLocation = Subfield('$(vFileTemp)','_',3);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Let vYearMonth = Subfield('$(vFileTemp)','_',2);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Set vExcelFile&amp;nbsp; = $(vYearMonth)_monthlysummary.xlsx;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Let vFileTimeCompare = FileTime('$(vQVDFile)') &amp;lt; FileTime('(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;$(RootDir_Data_Location_DEPT)&lt;/SPAN&gt;$(vExcelFile)');&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// Now do your work based on the comparison:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;IF vFileTimeCompare THEN&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;END IF&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NEXT vFile&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2016 15:10:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-QVD-file-if-new-data-published/m-p/1136254#M917674</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-13T15:10:53Z</dc:date>
    </item>
  </channel>
</rss>

