Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW

Considerations When Using Macros In QlikView

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Sonja_Bauernfeind
Digital Support
Digital Support

Considerations When Using Macros In QlikView

Last Update:

Jun 16, 2021 8:25:15 AM

Updated By:

Sonja_Bauernfeind

Created date:

Aug 27, 2012 10:07:05 AM

Use of macros in QlikView applications should always be limited and only be used as a last resort for the following reasons:

  1. Running macros may have a large negative impact on performance in a client or on a server. Macros automatically deletes the client cache, therefore it increases the chance of conflicts between cached and modified states. As a result the client or server may hang or crash.
  2. Macros are executed at VBScript (VBS) level while QlikView in general is executed at assembler level which is thousands of times faster by default.
  3. Macros are single threaded synchronous as opposed to QlikView which is asynchronous and heavily threaded and this causes the macros to interrupt all calculations and may lead QlikView to freeze.
  4. Macros always have a poor performance which makes them less desirable from a performance point of view.
  5. Macros are always secondary when it comes to QlikView functionality. First, all internal basic QlikView functions are run and tested and thereafter the macros are run and tested 
  6. Macros require constant maintenance. Applications need to be revisited with each new version of QlikView to guarantee that the macros are not impacted by any structural changes.
  7. Only a subset of macros will work in a server environment with clients (IE Plugin, Ajax, QV Mobile ) since local operations (copy to clipboard, export, print etc.) are not supported, though some of these have a server-side equivalent (e.g. Server-SideExport etc.) where each client impacting on the server performance in a negative way.

 

Environment:

QlikView 

 

The table below shows the clients that support running macros:

OS / Clients OCX (Active  X) Ajax               QV Mobile      IE Plug-In
IOS   X    
Windows X X   X

 

Conclusion: 

Macros may work with a few thousand records and not necessarily scale well. The problems may become more serious when larger datasets are involved. It is also important to note that certain events can only be captured through the use of macros and for this reason it may be difficult to avoid macros altogether. Qlik always strives to incorporate as much of this functionality as possible as basic QlikView functionality, thus limiting the use of macros in the long run. Given all of the above, macros cannot be part of any recommended QlikView design pattern.

Please note, VBScript is deprecated in Internet Explorer 11 and no longer supported in IE11 edge mode.More details can be found from these links.

 

https://msdn.microsoft.com/en-us/library/dn384057

https://blogs.windows.com/msedgedev/2017/04/12/disabling-vbscript-execution-in-internet-explorer-11/

 

 

Labels (1)
Contributors
Version history
Last update:
‎2021-06-16 08:25 AM
Updated by: