Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
Partner
Partner

Run Macro through QV Server v.10 ?

Is it possible to run macros on post reload when the document is reloaded by a qlikview server v10. In v9 I know that is not possible.

11 Replies
Highlighted
Partner
Partner

Run Macro through QV Server v.10 ?

Hi Ivan

No, you can't run macros and you can't run Alerts that send a mail. I confirmed this with someone from QlikTech when version 10 was released.

Colin

Highlighted
jsomsen
Contributor III

Run Macro through QV Server v.10 ?

Colin, Your post scares me! Can you clarify your statement: "No, you can't run macros and you can't run Alerts that send a mail." Is that only when using the "Post Reload" triggers from the server?

JS

Highlighted

Run Macro through QV Server v.10 ?

Hi,

Pasted from the v10 SR1 Reference Manual:

The following triggers will work as usual in the QlikView Server environmentregardless of which client is used:Document.OnAnySelect352Field.OnSelectField.OnChangeField.OnUnlockDocument.OnPressMacroButtonVariable.OnChangeVariable.OnInputThe following triggers are not to be used in the QlikView Server environment, sincethey lack meaning or may cause unexpected results:OnPostReduceDataOnPostReload


I'd add that in my experience, OnOpen macros don't work when the document is opened from the server with any client.

Besides, macro functionality is different between AJAX client and Desktop/IE Plugin, so test before keep developing your macros.

Hope that helps.

Highlighted
vgutkovsky
Honored Contributor II

Run Macro through QV Server v.10 ?

I can confirm that (by design) PostReload macros don't work on Publisher reloads. Sorry to be the bearer of bad news!

Highlighted
Partner
Partner

Run Macro through QV Server v.10 ?

Sorry, JS, didn't mean to scare you... 🙂 Miguel and Vlad have pretty much answered your question, but just to clarify what I meant: if a document is reloaded through QlikView Publisher or Server, any action triggered by the OnPostReload trigger will not run. I guess this is to prevent the execution of potentially harmful macros. Also, if you have an Alert setup that sends a mail, it will not be triggered if the document is reloaded through Server.

So if you have any macros that, for example, email out a .pdf report, or if you have an Alert that checks if a value is within certain parameters, or checks if some condition is met, you will need to run those documents using a batch file and Windows Scheduler.

Hope this is clearer.

Colin.

Highlighted
vgutkovsky
Honored Contributor II

Run Macro through QV Server v.10 ?

Or instead of Windows Scheduler, you can use "Supporting Tasks" in the QEMC to schedule it with Publisher...

Highlighted
MVP & Luminary
MVP & Luminary

Run Macro through QV Server v.10 ?


Colin Hancox wrote:Also, if you have an Alert setup that sends a mail, it will not be triggered if the document is reloaded through Server.


I disagree. In V9, OnPostReload Alerts can send emails. See http://qlikviewnotes.blogspot.com/2010/09/monitoring-reload-schedule.html. I have not confirmed that this still works in V10, but to my knowledge this has not changed.

Highlighted
Partner
Partner

Run Macro through QV Server v.10 ?

Vlad, we don't have Publisher, only QlikView Server, so Supporting Tasks is not available, that sheet in the QEMC is just blank. Is there another way to run batch jobs from QlikView Server? I suspect that without Publisher we are limited to using Windows Scheduler.

Highlighted
Partner
Partner

Run Macro through QV Server v.10 ?

Rob, that's very interesting, thanks for the link. I have a set of QlikView documents that do the same thing your File Age Monitor does - monitor the file ages of QVDs transferred from remote servers. I originally tried to run them through QlikView Server and the emails definitely did not get sent - I did quite a lot of testing.

If you've got it working though then I will try it again, maybe I missed something.