Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

problem with working the macro through qlikview management console

Good afternoon, please tell me. There is a qlikview management console. It has a task to unload and process Inside there is a 100% working macro. But the problem is if the task is performed through the console, then the macro does not work If in manual mode, then everything works well. In the window setup, the macro editor, all settings are set to the maximum possible for its operation. But at the same time the work of the macro does not happen, the entire script does not work. Colleagues tell me where you can look, and what to do about it.

9 Replies
Gysbert_Wassenaar

Macro's that try to manipulate front end things like charts and selections etc do not work when you reload the qlikview document through the QMC. Perhaps you can rewrite the script so you don't need the macro. Or you can try executing the macro with the OnReload trigger and execute the reload with an external batch script that can be scheduled with the Windows Task Scheduler.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

скрипт.jpg

Here is the script. It is used once 200-300. to do without it is problematic. I'm trying to understand where security settings block the execution of scripts, on QMC.I will be glad to help this.

Miguel_Angel_Baeyens

How is the macro called in the load script? Make sure you have checked "Allow macro execution on server" in the QMC > System > Setup > QlikView Servers > click on your server > Security

Or is it triggered by an action? In this case, as Gysbert points above, it will likely not work, by design.

Anonymous
Not applicable
Author

Tell me please. and what settings are needed for the correct execution of scripts on qvc

Miguel_Angel_Baeyens

It is not the settings, which I mentioned above, but the functionality of the macro and when it is triggered.

If you use a Function ... End Function and the code is to, say, pause the execution, the macro will work just fine regardless how it is executed. If the code is used for something within the document, it will not work, because the document objects do not exist at the time of running the script.

If macros, not related to the document properties are run within the script, they may work. If they are triggered OnPostReload or OnOpen, they will not.

So, how is the macro called in the script and what does it do?

marcus_sommer

I believe it couldn't work because RegExp is an ActiveX feature in VBS which is  not available during the qmc-reload because this needs some UI features (any dll's) which aren't included from the qvb.exe.

But I think it could with manageable efforts be directly replaced with Qlik native script-features. Here a similar case to demonstrate how it could be done: Re: for each loop

- Marcus

Anonymous
Not applicable
Author

rewrites part of the text. To ensure that Q V takes the data in the table

Anonymous
Not applicable
Author

I understand your proposal correctly. to rewrite the script?

marcus_sommer

Yes it meant rewriting the script because my suggestion is not a function which is integrated within a load else it requires some outside-steps - it's quasi a parallel preparation and the data will be later mapped with the origin load.

Here another approach which is logically quite similar but might be easier to understand and to implement: Re: Passing parameter strings that contain special characters.

- Marcus