<?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 Log any Import in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Log-any-Import/m-p/198664#M57888</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is some macro code that I use to log when data is exported, which you could adapt for your needs. It uses activedocument that obviously cannot be used in a script but you wont need to anyway - invoke your routine and pass it the details you want written to the log.&lt;/P&gt;&lt;P&gt;set doc=ActiveDocument&lt;/P&gt;&lt;P&gt;vExport = doc.Variables("vExport").GetContent.String&lt;/P&gt;&lt;P&gt;if vExport = "1" then&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; ' ************ log successful export ************&lt;BR /&gt;&lt;BR /&gt; vExportLog = doc.Variables("vExportLog").GetContent.String&lt;BR /&gt;&lt;BR /&gt; set fso = CreateObject("Scripting.FileSystemObject")&lt;/P&gt;&lt;P&gt;on error resume next&lt;/P&gt;&lt;P&gt;set logFile = fso.GetFile(vExportLog)&lt;/P&gt;&lt;P&gt;if err &amp;lt;&amp;gt; 0 then ' file does not exist&lt;BR /&gt; on error goto 0&lt;BR /&gt; set logFile = fso.CreateTextFile(vExportLog)&lt;BR /&gt; set logFile = fso.GetFile(vExportLog)&lt;BR /&gt; else&lt;BR /&gt; on error goto 0&lt;BR /&gt; end if&lt;/P&gt;&lt;P&gt;set txsStream = logFile.OpenAsTextStream(8) ' append&lt;BR /&gt; txsStream.WriteLine Now &amp;amp; " " &amp;amp; vExportTo &amp;amp; " created by " &amp;amp; doc.GetProperties.FileName&lt;BR /&gt; txsStream.Close&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Sep 2009 17:36:37 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-09-25T17:36:37Z</dc:date>
    <item>
      <title>Log any Import</title>
      <link>https://community.qlik.com/t5/QlikView/Log-any-Import/m-p/198663#M57887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i have to import a lot of execl-files and add some every week.&lt;/P&gt;&lt;P&gt;Now i want to build up a Logfile to Log the Date and filename of any import.&lt;/P&gt;&lt;P&gt;How can i do this&lt;/P&gt;&lt;P&gt;Thx&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2009 13:34:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Log-any-Import/m-p/198663#M57887</guid>
      <dc:creator>chrisg</dc:creator>
      <dc:date>2009-09-25T13:34:54Z</dc:date>
    </item>
    <item>
      <title>Log any Import</title>
      <link>https://community.qlik.com/t5/QlikView/Log-any-Import/m-p/198664#M57888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is some macro code that I use to log when data is exported, which you could adapt for your needs. It uses activedocument that obviously cannot be used in a script but you wont need to anyway - invoke your routine and pass it the details you want written to the log.&lt;/P&gt;&lt;P&gt;set doc=ActiveDocument&lt;/P&gt;&lt;P&gt;vExport = doc.Variables("vExport").GetContent.String&lt;/P&gt;&lt;P&gt;if vExport = "1" then&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; ' ************ log successful export ************&lt;BR /&gt;&lt;BR /&gt; vExportLog = doc.Variables("vExportLog").GetContent.String&lt;BR /&gt;&lt;BR /&gt; set fso = CreateObject("Scripting.FileSystemObject")&lt;/P&gt;&lt;P&gt;on error resume next&lt;/P&gt;&lt;P&gt;set logFile = fso.GetFile(vExportLog)&lt;/P&gt;&lt;P&gt;if err &amp;lt;&amp;gt; 0 then ' file does not exist&lt;BR /&gt; on error goto 0&lt;BR /&gt; set logFile = fso.CreateTextFile(vExportLog)&lt;BR /&gt; set logFile = fso.GetFile(vExportLog)&lt;BR /&gt; else&lt;BR /&gt; on error goto 0&lt;BR /&gt; end if&lt;/P&gt;&lt;P&gt;set txsStream = logFile.OpenAsTextStream(8) ' append&lt;BR /&gt; txsStream.WriteLine Now &amp;amp; " " &amp;amp; vExportTo &amp;amp; " created by " &amp;amp; doc.GetProperties.FileName&lt;BR /&gt; txsStream.Close&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2009 17:36:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Log-any-Import/m-p/198664#M57888</guid>
      <dc:creator />
      <dc:date>2009-09-25T17:36:37Z</dc:date>
    </item>
  </channel>
</rss>

