<?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 Handling non-existent columns in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Handling-non-existent-columns/m-p/1698920#M725083</link>
    <description>&lt;P&gt;I am trying to read through multiple qvd files and checking the max value of a particular date field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sub Member(Filename)&lt;BR /&gt;if FileSize(Filename) &amp;gt; 0 then&lt;BR /&gt;TempTable:&lt;BR /&gt;LOAD *&lt;BR /&gt;FROM [$(Filename)](qvd);&lt;BR /&gt;&lt;BR /&gt;AutoNumberQVDDate:&lt;BR /&gt;LOAD DISTINCT QVDDate&lt;BR /&gt;Resident TempTable;&lt;BR /&gt;AutoNumber1:&lt;BR /&gt;LOAD max(QVDDate) AS Key&lt;BR /&gt;Resident AutoNumberQVDDate;&lt;/P&gt;&lt;P&gt;let maxDate = PEEK('Key',0,'AutoNumber1');&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;P&gt;but some qvd files do not have QVDDate in them and have some other date like dss_create_date, so I modified my code to below:&lt;/P&gt;&lt;P&gt;sub Member(Filename)&lt;BR /&gt;if FileSize(Filename) &amp;gt; 0 then&lt;BR /&gt;TempTable:&lt;BR /&gt;LOAD *&lt;BR /&gt;FROM [$(Filename)](qvd);&lt;BR /&gt;&lt;BR /&gt;AutoNumberQVDDate:&lt;BR /&gt;LOAD DISTINCT QVDDate&lt;BR /&gt;Resident TempTable;&lt;BR /&gt;AutoNumber1:&lt;BR /&gt;LOAD max(QVDDate) AS Key&lt;BR /&gt;Resident AutoNumberQVDDate;&lt;/P&gt;&lt;P&gt;let maxDate = PEEK('Key',0,'AutoNumber1');&lt;/P&gt;&lt;P&gt;If (IsNull(maxDate)) then&lt;/P&gt;&lt;P&gt;AutoNumberQVDDate:&lt;BR /&gt;LOAD DISTINCT&amp;nbsp;dss_create_date&lt;BR /&gt;Resident TempTable;&lt;BR /&gt;AutoNumber1:&lt;BR /&gt;LOAD max(dss_create_date) AS Key&lt;BR /&gt;Resident AutoNumberQVDDate;&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;P&gt;I am getting error "File not found table not found", how do I make it work, short of writing seperate functions for each date value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 00:44:20 GMT</pubDate>
    <dc:creator>Shady</dc:creator>
    <dc:date>2024-11-16T00:44:20Z</dc:date>
    <item>
      <title>Handling non-existent columns</title>
      <link>https://community.qlik.com/t5/QlikView/Handling-non-existent-columns/m-p/1698920#M725083</link>
      <description>&lt;P&gt;I am trying to read through multiple qvd files and checking the max value of a particular date field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sub Member(Filename)&lt;BR /&gt;if FileSize(Filename) &amp;gt; 0 then&lt;BR /&gt;TempTable:&lt;BR /&gt;LOAD *&lt;BR /&gt;FROM [$(Filename)](qvd);&lt;BR /&gt;&lt;BR /&gt;AutoNumberQVDDate:&lt;BR /&gt;LOAD DISTINCT QVDDate&lt;BR /&gt;Resident TempTable;&lt;BR /&gt;AutoNumber1:&lt;BR /&gt;LOAD max(QVDDate) AS Key&lt;BR /&gt;Resident AutoNumberQVDDate;&lt;/P&gt;&lt;P&gt;let maxDate = PEEK('Key',0,'AutoNumber1');&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;P&gt;but some qvd files do not have QVDDate in them and have some other date like dss_create_date, so I modified my code to below:&lt;/P&gt;&lt;P&gt;sub Member(Filename)&lt;BR /&gt;if FileSize(Filename) &amp;gt; 0 then&lt;BR /&gt;TempTable:&lt;BR /&gt;LOAD *&lt;BR /&gt;FROM [$(Filename)](qvd);&lt;BR /&gt;&lt;BR /&gt;AutoNumberQVDDate:&lt;BR /&gt;LOAD DISTINCT QVDDate&lt;BR /&gt;Resident TempTable;&lt;BR /&gt;AutoNumber1:&lt;BR /&gt;LOAD max(QVDDate) AS Key&lt;BR /&gt;Resident AutoNumberQVDDate;&lt;/P&gt;&lt;P&gt;let maxDate = PEEK('Key',0,'AutoNumber1');&lt;/P&gt;&lt;P&gt;If (IsNull(maxDate)) then&lt;/P&gt;&lt;P&gt;AutoNumberQVDDate:&lt;BR /&gt;LOAD DISTINCT&amp;nbsp;dss_create_date&lt;BR /&gt;Resident TempTable;&lt;BR /&gt;AutoNumber1:&lt;BR /&gt;LOAD max(dss_create_date) AS Key&lt;BR /&gt;Resident AutoNumberQVDDate;&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;P&gt;I am getting error "File not found table not found", how do I make it work, short of writing seperate functions for each date value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:44:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Handling-non-existent-columns/m-p/1698920#M725083</guid>
      <dc:creator>Shady</dc:creator>
      <dc:date>2024-11-16T00:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Handling non-existent columns</title>
      <link>https://community.qlik.com/t5/QlikView/Handling-non-existent-columns/m-p/1699080#M725084</link>
      <description>&lt;P&gt;May be you can use ErrorMode variable. If it set to zero, the errors will be muted. Once the process done, set it back to 1.&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 12:45:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Handling-non-existent-columns/m-p/1699080#M725084</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2020-05-05T12:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: Handling non-existent columns</title>
      <link>https://community.qlik.com/t5/QlikView/Handling-non-existent-columns/m-p/1705623#M725085</link>
      <description>&lt;P&gt;Here is a Help link related to what Saran mentioned:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/ErrorVariables/ScriptError.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/ErrorVariables/ScriptError.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 12:37:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Handling-non-existent-columns/m-p/1705623#M725085</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-05-27T12:37:12Z</dc:date>
    </item>
  </channel>
</rss>

