# CreateVariableAsync Method

## Overloads

| [CreateVariableAsync(String)](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.CreateVariableAsync.htm#Qlik_Engine_App_CreateVariableAsync_System_String_) |  | Creates a variable. |
| --- | --- | --- |
| [CreateVariableAsync(AsyncHandle, String)](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.CreateVariableAsync.htm#Qlik_Engine_App_CreateVariableAsync_Qlik_Engine_AsyncHandle_System_String_) |  | Creates a variable. |
| [CreateVariableAsync<T>(AsyncHandle, Func<Response, T>, String)](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.CreateVariableAsync.htm#Qlik_Engine_App_CreateVariableAsync__1_Qlik_Engine_AsyncHandle_System_Func_Qlik_Engine_Communication_IO_Response___0__System_String_) |  | Creates a variable. |

[](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.CreateVariableAsync.htm) [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.CreateVariableAsync.htm)

## CreateVariableAsync(String)

Creates a variable.

### Declaration

```

          [Obsolete("Use _Doc::CreateVariableEx_ method instead")]
public Task<bool> CreateVariableAsync([QixName("qName")] string name)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| System.String | name | Name of the variable. Variable names are case sensitive. |

### Returns

| Type | Description |
| --- | --- |
| System.Threading.Tasks.Task&lt;System.Boolean&gt; |  |

### Implements

[IApp.CreateVariableAsync(String)](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.CreateVariableAsync.htm#Qlik_Engine_IApp_CreateVariableAsync_System_String_)

### Remarks

The operation is successful if qReturn is set to true.

[](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.CreateVariableAsync.htm) [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.CreateVariableAsync.htm)

## CreateVariableAsync(AsyncHandle, String)

Creates a variable.

### Declaration

```

          [Obsolete("Use _Doc::CreateVariableEx_ method instead")]
public Task<bool> CreateVariableAsync(AsyncHandle asyncHandle, [QixName("qName")] string name)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [AsyncHandle](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.AsyncHandle.htm) | asyncHandle | Handle to asynchronous method request |
| System.String | name | Name of the variable. Variable names are case sensitive. |

### Returns

| Type | Description |
| --- | --- |
| System.Threading.Tasks.Task&lt;System.Boolean&gt; |  |

### Implements

[IApp.CreateVariableAsync(AsyncHandle, String)](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.CreateVariableAsync.htm#Qlik_Engine_IApp_CreateVariableAsync_Qlik_Engine_AsyncHandle_System_String_)

### Remarks

The operation is successful if qReturn is set to true.

[](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.CreateVariableAsync.htm) [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.CreateVariableAsync.htm)

## CreateVariableAsync&lt;T&gt;(AsyncHandle, Func&lt;Response, T&gt;, String)

Creates a variable.

### Declaration

```
[Obsolete("Use _Doc::CreateVariableEx_ method instead")]
public Task<T> CreateVariableAsync<T>(AsyncHandle asyncHandle, Func<Response, T> onResult, [QixName("qName")] string name)
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [AsyncHandle](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.AsyncHandle.htm) | asyncHandle | Handle to asynchronous method request |
| System.Func&lt;[Response](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.Communication.IO.Response.htm), T&gt; | onResult | Continuation function |
| System.String | name | Name of the variable. Variable names are case sensitive. |

### Returns

| Type | Description |
| --- | --- |
| System.Threading.Tasks.Task&lt;T&gt; |  |

### Type Parameters

| Name | Description |
| --- | --- |
| T |  |

### Implements

[IApp.CreateVariableAsync<T>(AsyncHandle, Func<Response, T>, String)](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.CreateVariableAsync.htm#Qlik_Engine_IApp_CreateVariableAsync__1_Qlik_Engine_AsyncHandle_System_Func_Qlik_Engine_Communication_IO_Response___0__System_String_)

### Remarks

The operation is successful if qReturn is set to true.