Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to execute a Jscript function during a load script but it looks like the command is not executed at all.
I have the following Jscript function:
The functions works correctly when executing using "Run Macro" button.
I looked at previous forum posts and this command should work;
How do a call a Jscript function from a load script?
Are there security settings that prevents this from working?
Thanks,
Jonas
In general you could use macro-functions within the load-script but they mustn't contain any reference to ActiveDocument because it didn't exists at this time. Only after the script is finished ActiveDocument is available.
- Marcus
Okay, I see. But is there a way to use the variable sPath in the Jscript function?
Is there another syntax in order to read the variable in the Jscript?
or
Can I use something like LET vExecFunction = post($(sPath)) and update the Jscript equivently? Tried this in the past but couldn't get it to work
You should be able to do that. Just be sure to quote the parameter.
LET vExecFunction = post('$(sPath)');
Also if running QV Nov2017, you'll need turn off BNF mode by adding this as the first line of your script.
///$bnf off
-Rob
Thanks, I got it working now when running Qlikview Desktop, both on local computer and Qlikview server.
However, in QMC the function is not executing.
I'm running Qlikview server 12.10.20400.0 so I have not set BNF mode to off.
Are there any settings in the QMC or document that I need to set?
Take a look on this procedure:
Cause |
The new BNF script reload mode in QlikView November 2017 initial release doesn't allow the Macro function name in the script. |
Resolution |
Disable the BNF script reload mode either from the script, or fromthe settings.ini file.
|
I don't believe I use Qlikview November 2017. I run version 12.10.20400.0.
This is an information from Qlik in another problem.
Try, could be helpful and fix.
Added the EnableBnfReload=0 but it didn't help. Restarted the server to make sure settings were updated.
You're right, The option to execute Load Scripts in strict BNF mode is new to QlikView 12.20 (and Qlik Sense of the same date) or later and does not apply to earlier versions.