# SetStringValue Method

## Overloads

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

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

## SetStringValue(String)

Sets a string value to a variable.

### Declaration

```

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

### Parameters

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

### Remarks

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