<?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: Running a macro before a reload from the server in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Running-a-macro-before-a-reload-from-the-server/m-p/154261#M1310253</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/2084"&gt;gordon.savage&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to execute this same script as vb macro. how about the possibility&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Aug 2013 08:46:00 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-08-23T08:46:00Z</dc:date>
    <item>
      <title>Running a macro before a reload from the server</title>
      <link>https://community.qlik.com/t5/QlikView/Running-a-macro-before-a-reload-from-the-server/m-p/154255#M1310235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;Here is my problem: I have a QVW which contains a macro that will fetch data from an internet file. After that macro runs, I need it to reload the document and save it. I do not want to use an OnOpen trigger or anything like that to kick off the macro, I just want to schedule a job to do it. Is there any preReload() function or anything similar? I am pretty experienced with the QV Desktop application, but I am new to the Server.&lt;/P&gt;&lt;P&gt;Thanks in advance for the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 18:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-a-macro-before-a-reload-from-the-server/m-p/154255#M1310235</guid>
      <dc:creator />
      <dc:date>2026-01-26T18:19:17Z</dc:date>
    </item>
    <item>
      <title>Running a macro before a reload from the server</title>
      <link>https://community.qlik.com/t5/QlikView/Running-a-macro-before-a-reload-from-the-server/m-p/154256#M1310237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess I could create a dummy QVW file with a blank script. And that file would reload nothing then run the macro with an OnPostReload trigger. Then have my application run after that one is done.&lt;/P&gt;&lt;P&gt;Is there a smarter, more efficient way to go about doing this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Sep 2010 17:07:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-a-macro-before-a-reload-from-the-server/m-p/154256#M1310237</guid>
      <dc:creator />
      <dc:date>2010-09-24T17:07:40Z</dc:date>
    </item>
    <item>
      <title>Running a macro before a reload from the server</title>
      <link>https://community.qlik.com/t5/QlikView/Running-a-macro-before-a-reload-from-the-server/m-p/154257#M1310241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is certainly an option. So it sounds like the data is being fetched and stored locally? Can it not be fetched dynamically in the load script ? Dont forget that if you reference a subroutine/function within the load script that isnt 'native' Qlikview it will look for a document macro and execute it if it finds it.&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, 24 Sep 2010 17:45:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-a-macro-before-a-reload-from-the-server/m-p/154257#M1310241</guid>
      <dc:creator />
      <dc:date>2010-09-24T17:45:07Z</dc:date>
    </item>
    <item>
      <title>Running a macro before a reload from the server</title>
      <link>https://community.qlik.com/t5/QlikView/Running-a-macro-before-a-reload-from-the-server/m-p/154258#M1310244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the poor explanation. The data isn't actually being fetched by the macro, or else I would load it in the script like you suggested. What the macro does is: it queries a website, and this website has a server that dynamically produces a txt file. The macro returns the LOCATION of the txt file as a VARIABLE, which is then used in my load statement to load the data. So that txt file is actually only being created when my macro runs, and then telling me where the file is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I need the macro to run in order to get the location of the data before the script runs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Sep 2010 18:04:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-a-macro-before-a-reload-from-the-server/m-p/154258#M1310244</guid>
      <dc:creator />
      <dc:date>2010-09-24T18:04:23Z</dc:date>
    </item>
    <item>
      <title>Running a macro before a reload from the server</title>
      <link>https://community.qlik.com/t5/QlikView/Running-a-macro-before-a-reload-from-the-server/m-p/154259#M1310247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;Add a variable to your script like vMacroRun. Set it to 1.&lt;/P&gt;&lt;P&gt;Set your macro to run on OnPostreload&lt;/P&gt;&lt;P&gt;In your script :&lt;/P&gt;&lt;P&gt;if vMacroRun = 1 then&lt;/P&gt;&lt;P&gt;// Do nothing&lt;/P&gt;&lt;P&gt;Set vMacroRun = 0; //&lt;/P&gt;&lt;P&gt;exit script;&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;// Your regular script&lt;/P&gt;&lt;P&gt;------&lt;/P&gt;&lt;P&gt;// Last line in script&lt;/P&gt;&lt;P&gt;Set vMacroRun = 1;&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 Then make an External task and do a batchreload by using /r. Your macro will run and fetch LOCATION into the variable.&lt;/P&gt;&lt;P&gt;2. Do a regular load that is dependent on the first one being successful. The macro will not run since publisher will not execute it.&lt;/P&gt;&lt;P&gt;A little bit complicated but it should work fine.&lt;/P&gt;&lt;P&gt;Or just run the whole job as an External task fetching your variable on OnPostReload&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Sep 2010 12:38:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-a-macro-before-a-reload-from-the-server/m-p/154259#M1310247</guid>
      <dc:creator />
      <dc:date>2010-09-27T12:38:29Z</dc:date>
    </item>
    <item>
      <title>Running a macro before a reload from the server</title>
      <link>https://community.qlik.com/t5/QlikView/Running-a-macro-before-a-reload-from-the-server/m-p/154260#M1310250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the macro fetches the location, why can't you just use it as a function and load it directly in the script? For example in the load script:&lt;/P&gt;&lt;P&gt;LET a = getpath();&lt;/P&gt;&lt;P&gt;LOAD *&lt;BR /&gt;FROM $(a) (biff, embedded labels, table is Sheet1$);&lt;/P&gt;&lt;P&gt;where getpath is a function defined as:&lt;/P&gt;&lt;P&gt;Function GetPath ()&lt;BR /&gt; GetPath = "..\testfile.xls"&lt;BR /&gt;End Function&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>Tue, 28 Sep 2010 10:12:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-a-macro-before-a-reload-from-the-server/m-p/154260#M1310250</guid>
      <dc:creator />
      <dc:date>2010-09-28T10:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: Running a macro before a reload from the server</title>
      <link>https://community.qlik.com/t5/QlikView/Running-a-macro-before-a-reload-from-the-server/m-p/154261#M1310253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/2084"&gt;gordon.savage&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to execute this same script as vb macro. how about the possibility&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Aug 2013 08:46:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-a-macro-before-a-reload-from-the-server/m-p/154261#M1310253</guid>
      <dc:creator />
      <dc:date>2013-08-23T08:46:00Z</dc:date>
    </item>
  </channel>
</rss>

