createSessionVariable method

Note: STABLE.
This API is reliable and breaking changes are unlikely.

qlik.app.variable.createSessionVariable(qProp)

Creates a session variable, that is a temporary variable which is not persisted and needs to be recreated for each new session.

Version history

Introduced 2.1

Parameters

qProp

Type: Object

Variable properties:

Name Type Description
qInfo.qId String

Optional.

Variable id.

qName String Variable name.
qComment String

Optional.

Comment.

qDefinition String

Optional.

Variable definition.

qNumberPresentation Object Optional.
qIncludeInBookmark Boolean

Optional.

Include in bookmark flag.

Returns

A promise of a variable model.

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

Example

var app = qlik.openApp('c31e2aba-3b46-4b13-8b87-c5c2514dea1d');
	app.variable.createSessionVariable({qName : 'myvar', qDefinition: 'Month'});

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?