setContent method

Warning: DEPRECATED.
This API is deprecated and may be removed in a future version.

qlik.app.variable.setContent(name, content)

Sets the content of a variable.

Note: These changes are not persistent. They only last the duration of the engine session.

Version history

Introduced 1.0
Deprecated

2.1

Use instead: setNumValue method or setStringValue method.

Parameters

Name Type Description
name String Variable name.
content String Variable content.

Returns

A promise of a Qlik Associative Engine reply.

Tip: For more information regarding a promise, see https://code.angularjs.org/1.6.9/docs/api/ng/service/$q#the-promise-api.

Example

var app = qlik.openApp('c31e2aba-3b46-4b13-8b87-c5c2514dea1d');
app.variable.setContent('MYVAR','=(1+1)');

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?