Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
New Contributor II

Issue with SelectValues() in extension in single when using ticket authentication via Virtual Proxy

Hello!

There seems to be an issue with custom extensions in a single when using ticket authentication and virtual proxy. 
The problem occurs after an image is exported from any object in the single. Calls like 'selectvalues' and 'clear' will stop working. The extension still receives updates to its hypercube/listobjects and the selectvalue calls are still sent, but they don't do anything. I think a new ticket is requested after the image has been exported, at this point standard qliksense objects will still work fine, but it seems like a custom extension doesn't get refreshed. 
Does anyone have experience with this issue? I will look into reporting this as a bug.


1 Solution

Accepted Solutions
Honored Contributor

Re: Issue with SelectValues() in extension in single when using ticket authentication via Virtual Pr

Ok, looks like the problem is with the currApp call.

Try currApp(this) instead. Or save the app referenser in your first paint call. Or use the backendApi methods.

View solution in original post

5 Replies
Highlighted
Honored Contributor

Re: Issue with SelectValues() in extension in single when using ticket authentication via Virtual Pr

What happens  When you call selectValues or clear? Error messages? Any reply from engine? Web socket traffic?

Have you tried this with more than one extension? The bug might be in the extension.

Highlighted
New Contributor II

Re: Issue with SelectValues() in extension in single when using ticket authentication via Virtual Pr

Hello Erik, thank you for your reply!

What I'm seeing is that a new websocket gets created when exporting an image. After this the extension will send its calls to this new websocket, which just returns something like: 
{"jsonrpc":"2.0","id":9,"delta":true,"result":{"qReturn":[]},"change":[1,2]}
This does nothing in the dashboard. 

When I look at a normal Qliksense object I notice that they ignore the new websocket and keep sending their calls to the old websocket, which is why they have no issue. 

I have tested multiple extensions, it even occurs in the most simple one i could make which is a button that clears a field:
var app = qlik.currApp();
app.field('myfield').clear();

 

Honored Contributor

Re: Issue with SelectValues() in extension in single when using ticket authentication via Virtual Pr

Ok, looks like the problem is with the currApp call.

Try currApp(this) instead. Or save the app referenser in your first paint call. Or use the backendApi methods.

View solution in original post

Highlighted
New Contributor II

Re: Issue with SelectValues() in extension in single when using ticket authentication via Virtual Pr

currApp(this) fixes the problem! Thank you Erik for your help!

Highlighted
Honored Contributor

Re: Issue with SelectValues() in extension in single when using ticket authentication via Virtual Pr

Thanks,

currApp() might not work as expected at all times, you should be a bit careful.