# SetStringValue Method

## Overloads

| [SetStringValue(String)](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.GenericVariable.SetStringValue.htm#Qlik_Engine_GenericVariable_SetStringValue_System_String_) |  | Sets a string value to a variable. |
| --- | --- | --- |

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

## SetStringValue(String)

Sets a string value to a variable.

### Declaration

```

          public void SetStringValue([QixName("qVal")] string val)
    
  
```

### Parameters

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

### Implements

[IGenericVariable.SetStringValue(String)](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IGenericVariable.SetStringValue.htm#Qlik_Engine_IGenericVariable_SetStringValue_System_String_)

### Remarks

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