Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

General features 

=

==

Compare field with a value. You can use both "=" and "==". These and other operators can be used with most field types.

Code Block
{reference} = "1223-82"
{id} = 10234

Use double quotes with strings.

Inside a string literal, a double quote is written as two consecutive double quotes:

Code Block
{reference} = "Reference ""123"""

>, <

>=, <=

To compare numeric field values and dates.

Code Block
{count} >= 100

!=

<>

Not equal operators. Both have the same function.

AND

&&

Boolean "and" to combine conditions.

Code Block
{count} >= 100 && {count} < 1000
{count} >= 100 AND {count} < 1000

OR

||

Code Block
{count} < 100 || {count} > 1000
{count} < 100 OR {count} > 1000

!=

Not equal.

Code Block
{count} != 100
{reference} != "alpha"

( )

Brackets can be used to combine multiple conditions:

Code Block
({count} == 100 OR {count} == 101) AND {status} == 10

!

NOT

Negation:

Code Block
(NOT {count} == 100) OR {count} == 101
 
is equal to:
{count} != 100 OR {count} == 101
x ? y : z

Evaluates y if x is true, evaluates z if x is false.

Code Block
{count} >= ({status} = 1 ? 100 : 1000)
null

Literal to evaluate if a field is null or not:

Code Block
{deadline} == nullNOTnull
NOT {deadline} == null
  
Numbers 
+ - * /

Numeric operators.

Code Block
({words} * {document} > 1000)
  
Strings 

.StartsWith

.EndsWith

.Contains

Various operators to search string fields by prefix, suffix or infix.

Use NOT to negate.

Code Block
{reference}.StartsWith("123")
{reference}.EndsWith("123")
{reference}.Contains("123")
NOT {reference}.Contains("123")
 .Length

To query by string length:

Code Block
{reference}.Length < 10
  
Dates

You can use the DateTime object to compare dates.

 

To compare a date:

Code Block
{deadline} >= DateTime(2007, 1, 1)

Or with hours, minutes and seconds:

Code Block
{deadline} < DateTime(2007, 1, 1, 10, 30, 0)

...