Skip to main content
What this builds. A small vendor-scorecard fixture you can filter against, and a recipe for each of the 13 TableFilterOperator values — grouped by the question you’re answering, not by operator name. You’ll end up with. Snippets you can copy directly into your own code, plus a clear mental model of which operator matches your situation.

Setup

Match exact values — EQ, NEQ, IS_IN, IS_NOT_IN

“Find Acme”:
“Vendors not in EU.” Note that NEQ includes rows where the column is NULLFoxtrot (region missing) appears here:
“Vendors in EU or US” — use IS_IN instead of two OR conditions:
“Vendors outside EU and US” — IS_NOT_IN excludes the listed values and excludes nulls (so Foxtrot is not in the result):

Compare numbers — GT, GTE, LT, LTE

“Vendors with more than 10 units”:
“Vendors with five or more units” — GTE:
The same operators work on TimestampFormat columns — pass a datetime as value to filter by date.

Search text — CONTAINS, DOES_NOT_CONTAIN

CONTAINS is case-insensitive"a" matches both "Acme" and "Beta":
DOES_NOT_CONTAIN is its inverse:

Find missing data — IS_EMPTY, IS_NOT_EMPTY

Pass None as the value. Use these to find rows that haven’t been filled in yet (a common pattern when you’re staging data for an AI-generated column):

Filter file columns — FILENAMES_CONTAIN

For a column whose format is FileFormat (or ListOfFilesFormat), match rows whose attached filename contains a substring:

Cleanup

Combining operators. Every recipe above uses CompoundFilter.of(...) for a single AND’d group of conditions. For mixed AND/OR logic — e.g. “EU and (priority > 2 or status = closed)” — use nested FilterGroups. See Compose filters with AND and OR.
Ordering filters on currency or percent columns. For GT/LT comparisons on a money column, use a NumberKind.INT or NumberKind.FLOAT column instead.

See also

Compose filters with AND and OR

Nested FilterGroups for mixed-logic filters.

TableFilterOperator reference

Every operator with one-line semantics.

Rows and filters

Filters in context with insert / update / delete / scroll.