Aggregates
Aggregate Relation Fields allow you to get and filter information about related tables.
Attributes/Keys:
- type (required): Indicated type of aggregate function being used.
- avg: Can only be used with numeric fields. Will return the average value of the given field for related records.
- count: Can be used with any field. Will return the count of related records.
- max: Can only be used with numeric fields. Will return the maximum value of the given field for related records.
- min: Can only be used with numeric fields. Will return the minimum value of the given field for related records.
- sum: Can only be used with numeric fields. Will return the total value of the given field for related records.
- table (required): Name of table from which aggregate data should be pulled.
- field (required): Name of field against which aggregate should be run.
- join-field-local (required): Name of the field in local (main) table that should be used in join.
- join-field-remote (required): Name of the field in your remote (related) table that should be used in join.
- join-field (optional): If names of the join-field-local field and the join-field-remote field match, you can use join-field instead.
Example:
<field ColumnName="NumRecords">
<relation type="count" table="utable" field="uID" join-field="MyID" />
</field>
"ftable" attribute
Note that the "join-field" attributes could be eliminated with the use of the "ftable" attribute.