language area · Searches

Summary criteria

where can test aggregates as well as fields, such as sum(amount) > 10000, and Mynt filters rows before grouping and groups after it.

Implementation
Implemented in the compiler, not yet published
Kind
Mynt language, not a SuiteScript method
A

Supported · compiles today

myntwhere field === x && sum(field) > n
1let totals = search SalesOrder2    where mainline === true3        && sum(amount) > 100004    group by entity5    select entity, total = sum(amount)
suitescriptoutput, trimmed
1[2    ["mainline", search.Operator.IS, "T"],3    "and",4    ["sum(amount)", search.Operator.GREATERTHAN, 10000]5]

There is one where and no having: each criterion's stage comes from what it tests. || between a row test and a group test is an error, since they run at different stages. Oracle does not document summary terms in SuiteScript 2.x filter expressions, so this lowering is not yet verified against a live account.

B

In the compiler, not yet published: npm 0.1.0 does not have it. Verified with mynt build on 13 Oct 2026.

  1. Reached the compiler.
  2. Accepted Aggregates are tested in where, each criterion evaluated at its own stage, rather than in a separate having clause (compiler commit fa3fc6d).
C

SuiteScript methods this feature lowers to or works through. They are counted on their own pages, never through the feature.