# Operators

Last update: 2023-01-26
• Created for:
• Experienced
Developer

## Boolean functions

Boolean functions are used to perform boolean logic on different elements.

### And

The `and` function is used to create a logical conjunction.

Syntax

``````{%= query1 and query2 %}
``````

Example

The following operation will return all people with home country as France and birth year of 1985.

``````{%= profile.homeAddress.country = "France" and profile.person.birthYear = 1985 %}
``````

### Or

The `or` function is used to create a logical disjunction.

Syntax

``````{%= query1 or query2 %}
``````

Example

The following operation will return all people with home country as France or birth year of 1985.

``````{%= profile.homeAddress.country = "France" or profile.person.birthYear = 1985 %}
``````

## Comparison functions

Comparison functions are used to compare between different expressions and values, returning true or false accordingly.

### Equals

The `=` (equals) function checks whether one value or expression is equal to another value or expression.

Syntax

``````{%= expression = value %}
``````

Example

The following operation checks if the home address country is France.

``````{%= profile.homeAddress.country = "France" %}
``````

### Not equal

The `!=` (not equal) function checks whether one value or expression is not equal to another value or expression.

Syntax

``````{%= expression != value %}
``````

Example

The following operation checks if the home address country is not France.

``````{%= profile.homeAddress.country != "France" %}
``````

### Greater than

The `>` (greater than) function is used to check if the first value is greater than the second value.

Syntax

``````{%= expression1 > expression2 %}
``````

Example

The following operation defines people born strictly after 1970.

``````{%= profile.person.birthYear > 1970 %}
``````

### Greater than or equal to

The `>=` (greater than or equal to) function is used to check if the first value is greater than or equal to the second value.

Syntax

``````{%= expression1 >= expression2 %}
``````

Example

The following operation defines people born in or after 1970.

``````{%= profile.person.birthYear >= 1970 %}
``````

### Less than

The `<` (less than) comparison function is used to check if the first value is less than the second value.

Syntax

``````{%= expression1 < expression2 %}
``````

Example

The following operation defines people born before 2000.

``````{%= profile.person.birthYear < 2000 %}
``````

### Less than or equal to

The `<=` (less than or equal to) comparison function is used to check if the first value is less than or equal to the second value.

Syntax

``````{%= expression1 <= expression2 %}
``````

Example

The following operation defines people born in 2000 or before.

``````{%= profile.person.birthYear <= 2000 %}
``````

Operations with numbers