# SetStringValueAsync Method

## Overloads

| [SetStringValueAsync(String)](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IGenericVariable.SetStringValueAsync.htm#Qlik_Engine_IGenericVariable_SetStringValueAsync_System_String_) |  | Sets a string value to a variable. |
| --- | --- | --- |
| [SetStringValueAsync(AsyncHandle, String)](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IGenericVariable.SetStringValueAsync.htm#Qlik_Engine_IGenericVariable_SetStringValueAsync_Qlik_Engine_AsyncHandle_System_String_) |  | Sets a string value to a variable. |

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

## SetStringValueAsync(String)

Sets a string value to a variable.

### Declaration

```

          Task SetStringValueAsync([QixName("qVal")] string val)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| System.String | val | Value of the variable. The string can contain an expression. |

### Returns

| Type | Description |
| --- | --- |
| System.Threading.Tasks.Task |  |

### Remarks

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

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

## SetStringValueAsync(AsyncHandle, String)

Sets a string value to a variable.

### Declaration

```

          Task SetStringValueAsync(AsyncHandle asyncHandle, [QixName("qVal")] string val)
    
  
```

### 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 | val | Value of the variable. The string can contain an expression. |

### Returns

| Type | Description |
| --- | --- |
| System.Threading.Tasks.Task |  |

### Remarks

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