# createSessionVariable method

Information 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

Version history

| Version state | Details |
| --- | --- |
| Introduced | 2.1 |

## Parameters

### qProp

Type: Object

Variable properties:

qProp object properties

| Name | Type | Description |
| --- | --- | --- |
| qInfo.qId | String | Optional.<br><br>Variable id. |
| qName | String | Variable name. |
| qComment | String | Optional.<br><br>Comment. |
| qDefinition | String | Optional.<br><br>Variable definition. |
| qNumberPresentation | Object | Optional. |
| qIncludeInBookmark | Boolean | Optional.<br><br>Include in bookmark flag. |

## Returns

A promise of a variable model.

Tip noteFor more information regarding a promise, see [The Promise API](https://code.angularjs.org/1.5.8/docs/api/ng/service/$q#the-promise-api).

## Example

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