Field Types & Their Comparators
The comparators valid inside a where predicate depend on the field's data type. The table below summarizes which operators each type supports.
| Field type | Supported comparators |
|---|---|
| Text / String | =, !=, like, not like, in, not in, is null, is not null |
| Number / Decimal / Currency | =, !=, >, >=, <, <=, between, not between, in, not in, is null, is not null |
| Boolean | = |
| Date / DateTime | =, !=, >, >=, <, <=, between, not between, in, not in, is null, is not null |
| Enum / Picklist | =, !=, in, not in, is null, is not null |
| Lookup | =, !=, in, not in, is null, is not null (compares on related record id) |
| Multi-Lookup | in, not in, is null, is not null |
Text#
Use like with the % wildcard for partial matches:
like 'AC%'— starts withAClike '%pump'— ends withpumplike '%filter%'— containsfilternot like '%draft%'— does not containdraft
select id, subject from workorder where subject like '%inspection%' limit 50Number / Decimal / Currency#
select id, totalCost from workorder where totalCost between 1000 and 5000Boolean#
select id, subject from workorder where isCompleted = true limit 50Date / DateTime#
Date and DateTime field values can be supplied either as epoch time in milliseconds (a number) or as a quoted UTC string in the format 'YYYY-MM-DDTHH:mm:ssZ'. For example, 1735669800000 represents 2025-01-01T00:00:00+05:30. Range filtering uses between:
select id, createdTime from workorderwhere createdTime between 1735669800000 and 1743445799000The same range can be expressed with UTC strings:
select id, createdTime from workorderwhere createdTime between '2024-12-31T18:30:00Z' and '2025-03-31T17:29:59Z'Enum / Picklist (single & multi)#
Single-enum fields compare against their value. Multi-enum fields (such as multi_enum_field_workorder) hold a list; querying returns the selected labels.
select id, multi_enum_field_workorder from workorderwhere multi_enum_field_workorder in ('Electrical', 'Plumbing')Lookup#
A lookup field stores a reference to a record in another module. Selecting the lookup field by itself (vendor, priority) returns the related record id as a flat scalar value — e.g. "vendor": 88 — not a nested object. To read fields from the related module, traverse with a dot (vendor.name, priority.displayName). See Lookup Traversal.
Filtering on a lookup uses its id:
select id, subject, vendor from workorder where vendor = 12345 limit 25A record's status is also a lookup field (it references a state record), so it behaves exactly like any other lookup — selecting it returns the flat state id, and you traverse it to read a label:
select id, status, status.displayName from workorder where status = 'Open' limit 50Multi-Lookup#
A multi-lookup field (e.g. multi_lookup_field_workorder) references several records. It returns a list of ids and supports membership filtering:
select id, multi_lookup_field_workorder from workorderwhere multi_lookup_field_workorder in (101, 102, 103)