Summary: I introduce qcb-qlik-sse, a community Server Side Extension to share custom Qlik functions.
At the Masters Summit for Qlik, I dive into several different methods of creating reusable script and custom functions. In QlikView we have the ability to write custom functions using VbScript/Jscript in the qvw Module.
Custom functions have been useful for things like regular expressions, geo calculations, url encoding, encryption and others. I’ll call them “edge functions” — some of us need them, some of us don’t.
Qlik Sense does not have the module facility. How can we satisfy the requirement for custom function in Qlik Sense? The Server Side Extension (SSE) facility can fill the need and is available to both Qlik Sense and QlikView.
An SSE Plugin runs as a separate task and provides communication with a Qlik Script or chart Expression via a TCP port. The same SSE Plugin can serve both QS and QV.
Anyone can write an SSE. The Qlik team provides the SSE base and you write a plugin that wires your new functions to Qlik. The new functions can be used in both Script and Charts. A number of plugins have already been produced.
SSE seems to be the ideal place to provide a collection of edge functions. Rather than a bunch of one-offs, I’m thinking a good idea would be to pool resources into a single effort that could be shared, much like QlikView Components did for Script.
I’ve implemented this idea as qcb-qlik-sse. This server uses as it’s base the qlik-sse package created by Miralem Drek.
See what functions I’ve already implemented in the doc here. I’ve also provided an example qvf and qvw that exercise the functions.
If you want to try it out, download the project and define the plugin to QS or QV as documented here. You will also need node.js 8 or later installed.
Defined functions will show up in the suggestion list in both the script and expression editors.
I’ve labeled the project as “experimental” at this stage because I anticipate there could be some significant restructuring as I get feedback.
Let me know your ideas and if you find this useful!
Want to kick the tires on reusable code and make your Qlik team more efficient? Come to the Masters Summit for Qlik, a three day advanced training event for Qlik Developers.