Relational operators | Zoho QEngine Help

Relational Operators

In a nutshell
Relational operators compare two given values and return a boolean result. They are commonly used in conditional statements within QEngine scripts and include operators such as less than, greater than, less than or equal to, greater than or equal to, equal to, and not equal to. The result is True if the condition is met and False otherwise.

Overview

Relational operators compare two given values and return a boolean value, most commonly used in conditional statements.

The following is a list of Relational Operators:

< (Lesser than) 

Example:

  1. (x < y)            // True if x is lesser than y, otherwise false
  2. (1 < 2)            // True

> (Greater than)

Example:

  1. (x > y)           // True if x is greater than y, otherwise false
  2. (1 > 2)           // False

<= (Lesser than or equal to) 

Example:

  1. (x <= y)        // True if x is lesser than or equal to y, otherwise false
  2. (1 <= 2)        // True

>= (Greater than or equal to) 

Example:

  1. (x >= y)        // True if x is greater than or equal to y, otherwise false
  2. (1 >= 2)        // False

== (Equals)

Example:

  1. (x == y)       // True if x is equal to y, otherwise false
  2. (1 == 2)       // False

!= (Not equals) 

Example:

  1. (x != y)        // True if x is not equal to y, otherwise false
  2. (1 != 2)        // True

Data types applicable to Relational Operators

  • Number
  • Decimal
  • Date-time
  • Text (only for 'Equals' operator)