Last updated: 2022-04-14

Source: https://support.freshservice.com/support/solutions/articles/50000004101-operators-in-expression-builder-node

Operators are symbols that are used to execute various mathematical operations or logical comparisons to compute the desired data in the expression node. The following section includes a list of all of the supported operators.

OperatorDescriptionExampleReturn type
+Addition: Adds two values1. 2+3<br> <br> Result: 5<br> <br>2. 2.5+2.5<br> <br> Result: 5Number/Decimal
-Subtraction: Subtracts two values1. 2-3<br> <br> Result: -1<br> <br>2. 3.4-2.3<br> <br> Result: 1.1Number/Decimal
\*Multiplication: Multiplies two values1. 2\3<br> <br> Result: 6<br> <br>2. 3.4\2.3<br> <br> Result: 7.82Number/Decimal
/Division: Divides two values1. 4/2<br> <br> Result: 2<br> <br>2. 3.4/2.3<br> <br> Result:1.4782608696Number/Decimal
==Equal to: Checks if two values are equivalent.<br>Left and Right operand values should be of the same data type.1.  2 == 3<br> <br> Result: false<br> <br>2. happy=happy<br> <br> Result: trueBoolean
!=Not Equal to Checks if two values are not equivalent.<br>Left and Right operand values should be of the same data type.1. 2 != 3<br> <br>Result: true<br>2. happy!=happy<br> <br> Result: falseBoolean
<Lesser than Checks if the value on the left is less than the value on the right<br>Left and Right operand values should be of the same data type.1. 2<3<br> <br> Result: true<br> <br>2. happy<Happy<br> <br> Result: falseBoolean
>Greater than: Checks if the value on the left is greater than the value on the right.<br>Left and Right operand values should be of the same data type.1. 2>3<br> <br> Result:false<br> <br>2. happy> Happy<br> <br> Result:trueBoolean
<=Lesser than or equal to: Checks if the value on the left is less than or equivalent to the value on the right.<br>Left and Right operand values should be of the same data type1. 2<=3<br> <br> Result: true<br> <br>2. happy<=Happy<br> <br> Result: falseBoolean
>=Greater than or equal to: Checks if the value on the left is greater than or equivalent to the value on the right.<br>Left and Right operand values should be of the same data type1. 2 >= 3<br> <br> Result: false<br> <br>2. happy>=Happy<br> <br> Result: trueBoolean
&&Logical And: Checks if both the left and right expressions are true.// checks if both the conditions are met<br>Both Left and Right operand values should be an expression which evaluates as boolean values1.  2>3 && 3>4<br> <br>Result: false<br>2. "happy" != "Happy" && 3<4<br> <br>Result: trueBoolean
\\Logical OR Checksif any one of the expressions are true// checks if any one of the conditions is met.<br>Both Left and Right operand values should be an expression that evaluates as boolean values1. (2>3) \\(3>4)<br> <br>Result: False<br>2. ("happy" != "Happy") \\(3<4)<br> <br>Result: trueBoolean