sumif_records
Conditionally sum, count, or average a field in records where a specified condition matches, using operators such as equals, greater than, or contains.
Instructions
Conditional aggregation — like Excel SUMIF/COUNTIF/AVERAGEIF. Sum, count, or average a field where a condition matches. Operators: eq, neq, gt, gte, lt, lte, contains, startswith, in.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| records | Yes | Array of record objects. | |
| operator | Yes | Comparison operator. | |
| operation | No | Aggregation on matched records (default: sum). | sum |
| sum_field | Yes | Field to aggregate. | |
| decimal_places | No | ||
| condition_field | Yes | Field to test the condition against. | |
| condition_value | Yes | Value to compare against. Use an array for 'in' operator. |