Aggregators can be used to compute aggregates for cell values.
Interface
Aggregator
View sourceimport {aggregators} from '@airtable/blocks/models';// To get a list of aggregators supported for a specific field:const fieldAggregators = myField.availableAggregators;// To compute the total attachment size of an attachment field:const aggregator = aggregators.totalAttachmentSize;const value = aggregator.aggregate(myRecords, myAttachmentField);const valueAsString = aggregate.aggregateToString(myRecords, myAttachmentField);
interface Aggregator
displayName | string A user friendly name for this aggregator that can be displayed to users. |
key | AggregatorKey A unique key for this aggregator that can be used to identify it in code. |
shortDisplayName | string A short user friendly name for this aggregator that can be displayed to users. |
aggregate | Aggregates the value of |
aggregateToString | Aggregates the value of |