# AddFieldFromExpression Method

## Overloads

| [AddFieldFromExpression(String, String)](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.AddFieldFromExpression.htm#Qlik_Engine_IApp_AddFieldFromExpression_System_String_System_String_) |  | Adds a field on the fly. |
| --- | --- | --- |

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

## AddFieldFromExpression(String, String)

Adds a field on the fly.

### Declaration

```

          bool AddFieldFromExpression([QixName("qName")] string name, [QixName("qExpr")] string expr)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| System.String | name | Name of the field. |
| System.String | expr | Expression value.<br>It is not possible to use all aggregation functions. For example, you cannot add a field on the fly with an expression that uses the `Sum` or `Count` aggregation functions. |

### Returns

| Type | Description |
| --- | --- |
| System.Boolean |  |

### Remarks

The expression of a field on the fly is persisted but not its values.