Guide To Writing Queries

Operators

12min

Each operator can also be prefixed by not, which denotes its negation, e.g. not =, not smaller than, etc.



Equality

The RHS can be either a field or a value.

Symbol

Example

=, equal

[First Name] equal "John"


Comparison

The RHS can be either a field or a value.

Symbol

Example

smaller than, <

Likely < "USD" 5000

larger than, >

Likely larger than Worst

smaller than or equal, <=

Likely <= "EUR" 5000

larger than or equal, >=

Likely >= Best

Between

The between operator expects two arguments on the RHS. The arguments can be separated by either a comma , or semicolon ;. Either, or both, of the RHS arguments can be fields.

X between Y, Z is equivalent to X >= Y and X <= Z.

Likely between "USD" 5000; "EUR" 5000 Likely between Worst, Best


Membership

In

The in operator expects one or more arguments on the RHS. It tests whether the LHS argument is equal to any of the RHS arguments. Any of the RHS arguments can be fields.

Likely in "USD" 5000; "EUR" 5000; Worst; Best

Contains

The contains operator tests whether the LHS argument contains the value on the RHS. It is not case sensitive ("abc" is the same as "ABC", "aBC", "ABc" etc.). The RHS cannot be a field, only a value.

Name contains "inc"


Text

The RHS cannot be a field, only a value.

Symbol

Example

starts with

Name starts with "John"

ends with

Name ends with "Doe"


Temporal

The RHS can be either a field or a value.

Between for temporal fields is equivalent to X on or after Y and X before or on Z.

Symbol

Example

strictly before

[Date Created] strictly before today

strictly after

[Date Created] strictly before last month

before or on

[Date Created] strictly before @[next monday]

on or after

[Date Created] strictly before @[3 weeks ago]

between

[Date Created] between @[3 weeks ago], today


Emptiness

The empty operator does not have a RHS. For example, the following query searches for all records that have an empty description.

Description empty

It can also be used on links, in which case it means "has no linked records of that type". For example, if used in the Accounts module, the following query searches for Accounts that have no Opportunities.

Opportunity empty



Updated 25 Mar 2024
Doc contributor
Did this page help you?