Skip to main content Skip to complementary content

create method

Information noteSTABLE.

This API is reliable and breaking changes are unlikely.

Creates a variable.

Information noteA new implementation of the create method was introduced in version 2.1. The legacy implementation of the method will continue to work but it is recommended to use the new implementation.

Version history

Version history
Version state Details
Introduced 1.0
Updated 2.1



Type: String | Object

Variable name or properties. Properties:

qProp object properties
Name Type Description
qInfo.qId String


Variable id.

If the selected ID is already in use, a new ID is automatically set by the engine.

qName String

Variable name.

The name must be unique.

qComment String


Comment related to the variable.

qDefinition String


Variable definition.

qNumberPresentation Object


Defines the format of the value.

qIncludeInBookmark Boolean


Set to true to update the variable when applying a bookmark. The variable value will be persisted in the bookmark.


Returns a promise of a variable model.

Tip noteFor more information regarding a promise, see The Promise API.


Example: Current implementation - object

var app = qlik.openApp('c31e2aba-3b46-4b13-8b87-c5c2514dea1d', config);
	app.variable.create({qName : 'myvar', qDefinition: 'Month'});
app.variable.create parameter description
Name Type Description
Name String

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!