<?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: Run a macro from Trigger in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Run-a-macro-from-Trigger/m-p/114498#M17688</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel&lt;/P&gt;&lt;P&gt;It does have rights because when I run the macro it does update the file.&amp;nbsp; But when I try to ask the trigger to run the macro on reload it does nothing&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Nov 2018 12:25:44 GMT</pubDate>
    <dc:creator>paul_ripley</dc:creator>
    <dc:date>2018-11-07T12:25:44Z</dc:date>
    <item>
      <title>Run a macro from Trigger</title>
      <link>https://community.qlik.com/t5/QlikView/Run-a-macro-from-Trigger/m-p/114494#M17684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I have a simple macro that exports a chart to a file location&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Sub ExportFile&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 10pt;"&gt;set&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; obj1 = ActiveDocument.GetSheetObject("CH109")&lt;BR /&gt; obj1.ExportBiff &lt;A href="https://community.qlik.com/"&gt;\\DCL1-QLIK-WV03\QlikView_UDA\III_LIVE\FIN\01_SOURCE_DATA\XLS\TotalAllocs.xls&lt;/A&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ActiveDocument.GetApplication.Sleep 5000&lt;BR /&gt; &lt;BR /&gt; End Sub &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works but I need to run when I reload the qvw. So I went to Document Settings/Triggers/OnPostReload&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/217758_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;But when I reload it doesn't update export the file&lt;/P&gt;&lt;P&gt;Am I missing something?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2018 11:29:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-a-macro-from-Trigger/m-p/114494#M17684</guid>
      <dc:creator>paul_ripley</dc:creator>
      <dc:date>2018-11-07T11:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: Run a macro from Trigger</title>
      <link>https://community.qlik.com/t5/QlikView/Run-a-macro-from-Trigger/m-p/114495#M17685</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 guess you are running this from Publisher. That doesn't work unfortunately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will need to set up an external task using qv.exe /r &amp;lt;application.qvw&amp;gt; to get this to work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2018 12:09:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-a-macro-from-Trigger/m-p/114495#M17685</guid>
      <dc:creator>jerrysvensson</dc:creator>
      <dc:date>2018-11-07T12:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: Run a macro from Trigger</title>
      <link>https://community.qlik.com/t5/QlikView/Run-a-macro-from-Trigger/m-p/114496#M17686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jerry&lt;/P&gt;&lt;P&gt;The macro works on the server but for some reason I cant even get it to work on the server when manually reloading from the server.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2018 12:13:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-a-macro-from-Trigger/m-p/114496#M17686</guid>
      <dc:creator>paul_ripley</dc:creator>
      <dc:date>2018-11-07T12:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: Run a macro from Trigger</title>
      <link>https://community.qlik.com/t5/QlikView/Run-a-macro-from-Trigger/m-p/114497#M17687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does the account you use in the server have rights on that share and folder? If the file already exists, is it locked?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2018 12:15:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-a-macro-from-Trigger/m-p/114497#M17687</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2018-11-07T12:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: Run a macro from Trigger</title>
      <link>https://community.qlik.com/t5/QlikView/Run-a-macro-from-Trigger/m-p/114498#M17688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel&lt;/P&gt;&lt;P&gt;It does have rights because when I run the macro it does update the file.&amp;nbsp; But when I try to ask the trigger to run the macro on reload it does nothing&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2018 12:25:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-a-macro-from-Trigger/m-p/114498#M17688</guid>
      <dc:creator>paul_ripley</dc:creator>
      <dc:date>2018-11-07T12:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: Run a macro from Trigger</title>
      <link>https://community.qlik.com/t5/QlikView/Run-a-macro-from-Trigger/m-p/114499#M17689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see, you may want to see this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/UsingMacrosonQVS.htm" style="font-size: 10pt;" title="https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/UsingMacrosonQVS.htm"&gt;https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/UsingMacrosonQVS.htm&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"The following triggers are not to be used in the QlikView Server environment, since they lack meaning or may cause unexpected results:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;OnPostReduceData&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;OnPostReload&lt;/EM&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM&gt;"&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2018 13:57:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-a-macro-from-Trigger/m-p/114499#M17689</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2018-11-07T13:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Run a macro from Trigger</title>
      <link>https://community.qlik.com/t5/QlikView/Run-a-macro-from-Trigger/m-p/114500#M17690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK thanks both, so it seems I wont be able to run the macro based on the trigger. Jerry mentioned using an external task to run it.&amp;nbsp; I am not sure what this.&amp;nbsp; Would either of you be able to expand a little on this.&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2018 14:11:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-a-macro-from-Trigger/m-p/114500#M17690</guid>
      <dc:creator>paul_ripley</dc:creator>
      <dc:date>2018-11-07T14:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Run a macro from Trigger</title>
      <link>https://community.qlik.com/t5/QlikView/Run-a-macro-from-Trigger/m-p/114501#M17691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What Jerry means is that you can create a supporting task in the QMC &amp;gt; System &amp;gt; Supporting Tasks &amp;gt; External Program which can run&lt;SPAN style="font-size: 10pt;"&gt; anything that can be executed in Windows (.bat, .exe or .msi files for example). In your case, it could be a .BAT file that includes something like&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;qv.exe /r Document.qvw&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will run QlikView Desktop and will reload the script of the file Document.qvw. Once finished, it will trigger the OnPostReload actions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As any other task, it will appear in the QMC and can be triggered when another task has succeded, or failed, or on an external event (i.e.: using EDX).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See &lt;A href="https://help.qlik.com/en-US/qlikview/November2018/Subsystems/QMC/Content/QV_QMC/QMC_System_SupportingTasks_ExternalPrograms.htm" title="https://help.qlik.com/en-US/qlikview/November2018/Subsystems/QMC/Content/QV_QMC/QMC_System_SupportingTasks_ExternalPrograms.htm"&gt;https://help.qlik.com/en-US/qlikview/November2018/Subsystems/QMC/Content/QV_QMC/QMC_System_SupportingTasks_ExternalProgr…&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Command line parameters available: &lt;A href="https://help.qlik.com/en-US/qlikview/November2018/Subsystems/Client/Content/QV_QlikView/Starting_QlikView.htm" title="https://help.qlik.com/en-US/qlikview/November2018/Subsystems/Client/Content/QV_QlikView/Starting_QlikView.htm"&gt;https://help.qlik.com/en-US/qlikview/November2018/Subsystems/Client/Content/QV_QlikView/Starting_QlikView.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2018 16:54:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-a-macro-from-Trigger/m-p/114501#M17691</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2018-11-07T16:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: Run a macro from Trigger</title>
      <link>https://community.qlik.com/t5/QlikView/Run-a-macro-from-Trigger/m-p/114502#M17692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks, will look into it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2018 17:12:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-a-macro-from-Trigger/m-p/114502#M17692</guid>
      <dc:creator>paul_ripley</dc:creator>
      <dc:date>2018-11-07T17:12:24Z</dc:date>
    </item>
  </channel>
</rss>

