# GetVariableByIdAsync Method

## Overloads

| [GetVariableByIdAsync(String)](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.GetVariableByIdAsync.htm#Qlik_Engine_App_GetVariableByIdAsync_System_String_) |  | Gets the handle of a variable. |
| --- | --- | --- |
| [GetVariableByIdAsync(AsyncHandle, String)](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.GetVariableByIdAsync.htm#Qlik_Engine_App_GetVariableByIdAsync_Qlik_Engine_AsyncHandle_System_String_) |  | Gets the handle of a variable. |
| [GetVariableByIdAsync<T>(AsyncHandle, Func<Response, T>, String)](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.GetVariableByIdAsync.htm#Qlik_Engine_App_GetVariableByIdAsync__1_Qlik_Engine_AsyncHandle_System_Func_Qlik_Engine_Communication_IO_Response___0__System_String_) |  | Gets the handle of a variable. |

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

## GetVariableByIdAsync(String)

Gets the handle of a variable.

### Declaration

```

          public Task<GenericVariable> GetVariableByIdAsync([QixName("qId")] string id)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| System.String | id | Identifier of the variable. |

### Returns

| Type | Description |
| --- | --- |
| System.Threading.Tasks.Task&lt;[GenericVariable](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/NetSDKAPIref/Content/Qlik.Engine.GenericVariable.htm)&gt; |  |

### Implements

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

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

## GetVariableByIdAsync(AsyncHandle, String)

Gets the handle of a variable.

### Declaration

```

          public Task<GenericVariable> GetVariableByIdAsync(AsyncHandle asyncHandle, [QixName("qId")] string id)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [AsyncHandle](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/NetSDKAPIref/Content/Qlik.Engine.AsyncHandle.htm) | asyncHandle | Handle to asynchronous method request |
| System.String | id | Identifier of the variable. |

### Returns

| Type | Description |
| --- | --- |
| System.Threading.Tasks.Task&lt;[GenericVariable](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/NetSDKAPIref/Content/Qlik.Engine.GenericVariable.htm)&gt; |  |

### Implements

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

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

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

Gets the handle of a variable.

### Declaration

```
public Task<T> GetVariableByIdAsync<T>(AsyncHandle asyncHandle, Func<Response, T> onResult, [QixName("qId")] string id)
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [AsyncHandle](https://help.qlik.com/en-US/sense-developer/May2026/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/May2026/Subsystems/NetSDKAPIref/Content/Qlik.Engine.Communication.IO.Response.htm), T&gt; | onResult | Continuation function |
| System.String | id | Identifier of the variable. |

### Returns

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

### Type Parameters

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

### Implements

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