Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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!!

1 Solution

Accepted Solutions
ErikWetterberg

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.

View solution in original post

2 Replies
ErikWetterberg

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.

Anonymous
Not applicable
Author

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