Comparison operators

OperatorOperationExampleExample Answer
=Equal${age} = 25true or false
!=Not equal${age} != 25true or false
>Greater-than${age} > 25true or false
>=Greater-than or equal${age} >= 25true or false
<Less-than${age} < 25true or false
<=Less-than or equal${age} <= 25true or false

In the examples above, ${age} represents the current field’s value, and the operator is used to compare it with the value 25. The constraint will evaluate to either true or false, depending on whether the comparison is satisfied or not.

Logical operators

Logical operators are used to combine multiple expressions in constraints. Here are some commonly used logical operators along with their operations and examples:

OperatorOperationExample
orReturns true if either expression is true${age} = 3 or ${age} = 4
andReturns true only if both expressions are true${age} > 3 and ${age} < 5
not()Returns true if the expression is not truenot(${age} > 3 and ${age} < 5)

In the examples above, ${age} represents the current field’s value, and the logical operators are used to combine expressions. The constraint will evaluate to true or false based on the conditions specified.

Example 1:

Example 2:

Example 3:

Was this page helpful?