|Relation||Specifies a relation to an entity that contains the fields you want to summarize using an aggregation aggregate function.|
|AggregationType||Indicates the aggregation aggregate 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 aggregate 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 the aggregation will recalculate. 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.