# setContent method

Warning note**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.

Information noteThese changes are not persistent. They only last the duration of the engine session.

## Version history

Version history

| Version state | Details |
| --- | --- |
| Introduced | 1.0 |
| Deprecated | 2.1<br><br>Use instead: [setNumValue method](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/VariableAPI/setNumValue-variable-method.htm) or [setStringValue method](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/VariableAPI/setStringValue-variable-method.htm). |

## Parameters

### name

Type: String

Variable name.

### content

Type: String

Variable content.

## Returns

A promise of a Qlik associative engine reply.

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.setContent('MYVAR','=(1+1)');
```