Qlik Community

Qlik Sense Integration, Extensions, & APIs

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

iosu_gar
New Contributor

Error From Engine on Variable Set through API

Hello,

I have a mashup which is constantly throwing error messages to the browser console. I have isolated the problem in a very simple mashup, which only sets a variable value:

require( ["js/qlik"], function ( qlik ) {

     var app = qlik.openApp('MayApp.qvf', config);

     app.getObject('QV01','uGgnDc');

     // THIS SENTENCE THROWS THE ERROR:

     app.variable.setStringValue('var1', 'NewValue');

} );

The sentence works, because the variable 'var1' changes its value correctly. Even so, this is the error I get:

Error.PNG

I'm getting the same error both in Qlik Sense Server (November 2017 Release) and Qlik Sense Desktop (February 2017 Release).

Any ideas on what could be the issue here? Thanks!!

Tags (2)
1 Solution

Accepted Solutions
erik_wetterberg
Honored Contributor

Re: Error From Engine on Variable Set through API

Hi,

That's normal. Your code will try to get the object and before that's ready sets the variable value. Since that affects the object, engine will abort the getObject request. The client should handle this and resend the command, so it will look Ok to the users.

To avoid this change the order of the calls and set the variable before you do the getObject.

Erik Wetterberg

Please mark as helpful and/or correct if you are helped by this.

Erik Wetterberg
https://extendingqlik.upper88.com/
2 Replies
erik_wetterberg
Honored Contributor

Re: Error From Engine on Variable Set through API

Hi,

That's normal. Your code will try to get the object and before that's ready sets the variable value. Since that affects the object, engine will abort the getObject request. The client should handle this and resend the command, so it will look Ok to the users.

To avoid this change the order of the calls and set the variable before you do the getObject.

Erik Wetterberg

Please mark as helpful and/or correct if you are helped by this.

Erik Wetterberg
https://extendingqlik.upper88.com/
iosu_gar
New Contributor

Re: Error From Engine on Variable Set through API

Thanks for your help Erik. I know understand this behaviour.

Community Browser