# AddFieldFromExpression method

Adds a field on the fly.

Information note

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

Information note

The operation is successful if **qSuccess** is set to true.

## Parameters

| Name | Description | Mandatory | Type |
| --- | --- | --- | --- |
| qName | Name of the field. | Yes | String |
| qExpr | 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. | Yes | String |

## Returns

| Name | Description | Type |
| --- | --- | --- |
| qSuccess | True or False. | Boolean |