<?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 execute macro during script reload in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/execute-macro-during-script-reload/m-p/228574#M80597</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a macro that export fields in a chart to QVD. Initially I only have one business unit to reload, so I use OnPostReload event to export the fields and create the QVD.&lt;/P&gt;&lt;P&gt;Now, I have more business units to reload so I put a for loop in my script to reload from another database. My issue now is to trigger the macro to export the fields to QVD, one time for each business unit.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I tried to use variable OnChange event and set the variable to another value during script reload but the macro would not execute. Can my setting be wrong or this variable OnChange event is effective during user intervention from layout only?&lt;/P&gt;&lt;P&gt;Any input is greatly appreciated! Been stuck for hours. Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Feb 2010 10:13:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-02-02T10:13:11Z</dc:date>
    <item>
      <title>execute macro during script reload</title>
      <link>https://community.qlik.com/t5/QlikView/execute-macro-during-script-reload/m-p/228574#M80597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a macro that export fields in a chart to QVD. Initially I only have one business unit to reload, so I use OnPostReload event to export the fields and create the QVD.&lt;/P&gt;&lt;P&gt;Now, I have more business units to reload so I put a for loop in my script to reload from another database. My issue now is to trigger the macro to export the fields to QVD, one time for each business unit.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I tried to use variable OnChange event and set the variable to another value during script reload but the macro would not execute. Can my setting be wrong or this variable OnChange event is effective during user intervention from layout only?&lt;/P&gt;&lt;P&gt;Any input is greatly appreciated! Been stuck for hours. Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2010 10:13:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/execute-macro-during-script-reload/m-p/228574#M80597</guid>
      <dc:creator />
      <dc:date>2010-02-02T10:13:11Z</dc:date>
    </item>
    <item>
      <title>execute macro during script reload</title>
      <link>https://community.qlik.com/t5/QlikView/execute-macro-during-script-reload/m-p/228575#M80598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I reload my file by invoking a .bat file that reloads the document that opens it again passing a variable/value named pair:&lt;/P&gt;&lt;P&gt;CALL "C:\PROGRAM FILES\QLIKVIEW\QV.EXE" /R "E:\QVApplications\QVCustomers\mydoc.QVW"&lt;BR /&gt;CALL "C:\PROGRAM FILES\QLIKVIEW\QV.EXE" /VvExport=1 "E:\QVApplications\QVCustomers\mydoc.QVW"&lt;/P&gt;&lt;P&gt;Attached to the OnOpen event is a macro that checks the value of the variable (set to 0 in the document) then does whatever is required:&lt;/P&gt;&lt;P&gt;set doc=ActiveDocument&lt;BR /&gt;vExport = doc.Variables("vExport").GetContent.String&lt;BR /&gt;if vExport = "1" then&lt;BR /&gt;(do stuff)&lt;BR /&gt;doc.GetApplication.Quit&lt;BR /&gt;end if&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2010 10:58:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/execute-macro-during-script-reload/m-p/228575#M80598</guid>
      <dc:creator />
      <dc:date>2010-02-02T10:58:11Z</dc:date>
    </item>
    <item>
      <title>execute macro during script reload</title>
      <link>https://community.qlik.com/t5/QlikView/execute-macro-during-script-reload/m-p/228576#M80599</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 don't understand the problem really...&lt;BR /&gt;What's stopping you from loading all data and then run the macro onPostReload just as you do now and save all business units at the same time?&lt;/P&gt;&lt;P&gt;/Fredrik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2010 12:32:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/execute-macro-during-script-reload/m-p/228576#M80599</guid>
      <dc:creator />
      <dc:date>2010-02-02T12:32:02Z</dc:date>
    </item>
    <item>
      <title>execute macro during script reload</title>
      <link>https://community.qlik.com/t5/QlikView/execute-macro-during-script-reload/m-p/228577#M80600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gordon,&lt;/P&gt;&lt;P&gt;Thanks for your idea. My client is using QVS9 to schedule the reload thus eliminating the bat file.&lt;/P&gt;&lt;P&gt;Hi Fredrik,&lt;/P&gt;&lt;P&gt;My client wants to keep 1 qvw file to 1 business units. When i export the QVD, it should go to different folder as per the business unit. Any idea?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2010 14:58:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/execute-macro-during-script-reload/m-p/228577#M80600</guid>
      <dc:creator />
      <dc:date>2010-02-02T14:58:33Z</dc:date>
    </item>
  </channel>
</rss>

