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:
trueComponent.BooleanField(or a string field that evaluates totrueorfalse)Component.Name != "Excluded component"((Component.Name != "cmp1") && !(Component.Name = "cmp2"))
| Boolean element | Operator | Operand(s) | Evaluates to |
|---|---|---|---|
| Boolean literal | true | n/a | true |
| Boolean literal | false | n/a | false |
| Unary operator | ! | Boolean | true if the operand is false, false otherwise |
| Parentheses | ( ) | Any | Use to disambiguate a complex Boolean expression. |
| Binary operator | && | Booleans | true if both operands are true, false if at least one operand is false. |
| Binary operator | || | Booleans | true if at least one operand is true, false if both operands are false. |
| Binary operator | < | String or numerical | true only if the first operand is smaller than the second. |
| Binary operator | <= | String or numerical | true only if the first operand is smaller than, or equal to, the second. |
| Binary operator | > | String or numerical | true only if the first operand is larger than the second. |
| Binary operator | >= | String or numerical | true only if the first operand is larger than, or equal to, the second. |
| Binary operator | == or = | String, Boolean or numerical | true if the first operand is equal to the second. |
| Binary operator | != | String, Boolean or numerical | true only if the first operand is not equal to the second. |