|This field type allows you to create a calculated total field , using an aggregation function.|
|Relation||Specifies a relation to an entity , of which that contains the fields you want to summarize using an aggregation function.|
|AggregationType||Indicates the aggregation function. Possible values are:|
|Field||Specifies on which column from the entity specified in the Relation attribute the aggregation will occur.|
How It Works
Aggregated fields behave differently depending on how you design your data structure.
If your data structure only contains the entity with the aggregated field but not the child-entity from which the aggregation is calculated, then the data will be selected on the database level using an SQL aggregated expressionaggregate function.
But you can also include the child entity in the target data structure.
In that case the aggregation will be calculated in-memory and on each change in the detail entity it the aggregation will recalculate the aggregation. This way the user will see the recalculated total automatically after he changes the detail data.
You want to create a total field
InvoiceTotal in an entity
Invoice. This field should give a summary of all
Price fields in the
To do this, you create an aggregated field in the
Invoice entity. It will have the following attributes:
This field will then display a total price on the invoice level automatically.