Boolean operators

You create Boolean expressions by combining operands with logical operators. The following table lists the Boolean operators supported by the template expression language:

The following are examples of Boolean expressions:

  • true
  • Component.BooleanField (or a string field that evaluates to true or false)
  • Component.Name != "Excluded component"
  • ((Component.Name != "cmp1") && !(Component.Name = "cmp2"))
Boolean elementOperatorOperand(s)Evaluates to
Boolean literaltruen/atrue
Boolean literalfalsen/afalse
Unary operator!Booleantrue if the operand is false, false otherwise
Parentheses( )AnyUse to disambiguate a complex Boolean expression.
Binary operator&&Booleanstrue if both operands are true, false if at least one operand is false.
Binary operator||Booleanstrue if at least one operand is true, false if both operands are false.
Binary operator<String or numericaltrue only if the first operand is smaller than the second.
Binary operator<=String or numericaltrue only if the first operand is smaller than, or equal to, the second.
Binary operator>String or numericaltrue only if the first operand is larger than the second.
Binary operator>=String or numericaltrue only if the first operand is larger than, or equal to, the second.
Binary operator== or =String, Boolean or numericaltrue if the first operand is equal to the second.
Binary operator!=String, Boolean or numericaltrue only if the first operand is not equal to the second.