Qlik Community

QlikView Documents

Documents for QlikView related information.

Check Security Function (with show/hide tabrow macro example)

autopilot
Contributor III

Check Security Function (with show/hide tabrow macro example)

If you've ever deployed a macro solution that depends on access to the user's system, then you've probably encountered the support issues related to the module security not being properly set. I've also seen several times on the community where this was a barrier to usability as well - like a blindspot for novice developers and power-users.

This is a simple example of using the API to check module security. The call for the function is included in a sample macro set which will toggle the tabrow visibility. If the security is not set appropriately, a dialog will prompt to instruct steps for correcting the issue and avoiding the infamous script runtime error.

Included in the attachments are the script.txt and example qvw app.

Hope this is helpful!

Attachments
Comments
hugmarcel
Contributor III

Thats very nice! Thank you.

What is the exact meaning of

  objShell.SendKeys "{F6}"
  objShell.SendKeys "{F7}"

Regards! Marcel

0 Likes
autopilot
Contributor III

These are methods for sending keystrokes to the application.

For QlikView, F6 is a shortcut to go to the previous sheet. Likewise, F7 is a shortcut to go to the next sheet.

They help to workaround a strange issue that occurs otherwise - but you're welcome to comment out and test.

0 Likes
hugmarcel
Contributor III

Ok thank you. I saw the keystrokes have different meaning in the plugin vs as in the fat Client.

Hm, your macro-tests cannot be executed if security is in safe mode (=0)... So the tests by themselves fail...

How do you deal with this?

Thanks - Marcel

0 Likes
autopilot
Contributor III

You need to change the security settings. ctrl+shift+m and select give system access.

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎2014-05-09 12:50 PM
Updated by: