Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I would like to add a button in my application that calls an external script with the current selection as its input somehow. Is this possible?
Maybe by creating a temporary bookmark, and sending the ID of the bookmark to the script, or something like that. I already know how to write a script that could find the information I need from a bookmark (I think), but I don't know how to trigger all this from within the Qlik Sense application, or if it is even possible.
Yes, it's possible. See https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/LoadData/ac-advanced-ana...
-Rob
Great, thanks! I didn't know about Server Side Extensions. The documentation you linked to seems to refer to Qlik Cloud, but this is possible also for local installations, right?
It seems like I can call some python code running in an external docker image using this approach, which is great! But the examples I find use this to calculate expressions either in the load script or in a chart script. I still don't understand how this can be hooked up to the click of a button, but maybe I am missing something here.
Yes, possible for local (client-managed) installations as well.
To clarify some nomenclature. "Server Side Extensions" is a feature available in client-managed, but not Qlik Cloud.
Both Cloud and client-managed offer a newer feature called "Analytics Connections". Analytics Connections use the "Server Side Extension syntax". This nomenclature sometimes causes confusion for me.
I did some work with SSE, but not with AAC. I don't know of any good examples for AAC. You could stick with SSE, but that limits you to client-managed.
-Rob
Thanks for your help!
I can now almost do what I want. I use the Button "Chart", and the action I use is "Set variable value". Then I use this expression as the value to set a variable to:
=PythonTest.MyFunction(distinct [Region])
I have also managed to create a python server that receives the request and can parse the currently selected Regions as input. Great!
However, I intend to implement sort of an action function, that uses this call to perform certain actions given these regions. Unfortunately, Qlik Sense seems really smart when it comes to caching and pre-fetching data, so it calls my function even before I press the button sometimes, and if I select the same regions twice, it might not call the function at all. Does anyone here know if this behaviour is avoidable? Or do I need to write my own "Button" too, to achieve this?