# Condition syntax¶

Trigger conditions can be described by following list of operators, values and functions.

## Operators¶

### Logical¶

Operator Description
`or`, `||`
```TRUE if either Boolean expression is TRUE.

Example:

[CommentType] = 'Public' or [Created] < '#01/01/2015#'
```
`and`, `&&`
```TRUE if both Boolean expression is TRUE.

Example:

[AssignedTo] = '' and [AssignedTo] = [Editor]
```

The `and` operator has more priority than the `or`.

### Relational¶

• `=`, `==`, `!=`, `<>`
• `<`, `<=`, `>`, `>=`
```1 < 2
```

### Additive¶

• `+`, `-`
```1 + 2 - 5
```

### Multiplicative¶

• `*`, `/`, `%`
```5 * 5
```

### Bitwise¶

• `&` (bitwise and), `|` (bitwise or), `^` (bitwise xor), `<<` (left shift), `>>` (right shift)
```1 >> 5
```

### Unary¶

• `!`, `not`, `-`, `~` (bitwise not)
```not true
```

### Primary¶

• `(`, `)`
• values
```(2 + 3) * 4
```

## Values¶

### Integers¶

They are represented using numbers.

```123456
```

### Floating point numbers¶

Use the dot to define the decimal part.

```123.456
.123
```

They are evaluated as Decimal.

### Scientific notation¶

You can use the `e`  to define power of ten (10^).

```1.22e1
1e2
1e+2
1e-2
.1e-2
1e10
```

### Dates and Times¶

Must be enclosed between sharps.

```#2008/01/31# // for en-US culture
```

### Booleans¶

Booleans can be either `true`  or `false`.

```true
```

### Strings¶

Any character between single quotes `'` are evaluated as String.

```'hello'
```

You can escape special characters using \\\'\n\r\t.

### Function¶

A function is made of a name followed by braces, containing optionally any value as arguments.

```Abs(1), doSomehting(1, 'dummy')
```

### Parameters¶

A parameter as a name, and can be optionnally contained inside brackets.

```2 + x, 2 + [x]
```