While many properties simply store text values, the Boolean property type provides some additional features not found in other property types. Since Boolean parameters must evaluate to true or false, Booleans also provide comparisons, Boolean logic, and grouping.
The following operations are listed here in their "order of precedence". Operators at a higher order of precedence (first row in the table) are evaluated before operators of a lower precedence. Operators at the same level of precedence are evaluated from left to right as they are found in the expression.
Operator | Description |
---|---|
Property references |
Textual substitutions occur before any logical interpretations of an expression. These can be {{^propertyname^}} or {{?propertyname?}} substitutions. |
Parentheses | Parentheses (the characters "(" and ")") break the regular precedence rules and force an operator further down the ordering list to be evaluated first. This is most useful when you want to negate an entire "and" or "or" expression since those two operators have lower precedence than "not". |
not |
An operator that negates its argument, i.e. "not false" becomes true and "not true" becomes false. This operator has a very high precedence so parentheses are required in order to negate phrases involving "and" and "or" or == or !=. Examples
|
"==" and "!=" |
Binary operators that test for string equality and inequality in Boolean parameters. == tests for equality != tests for inequality Examples
Note: Double quotes are required around the textual substitutions. If there are no double quotes, the substituted text is not evaluated as a string.
|
"and" and "or" |
Provide logical "and" and "or" tests in the Boolean parameter. and - evaluates to true if and only if both of its arguments are true or - evaluates to true if any of its arguments are true These are both binary operators, meaning that they take only two arguments. |
Example 1
{{?PlanPrefix?}} and not ({{^HonorDiscounts^}} or {{^HonorSales^}} or {{^HonorLocalPricing^}})
- In this example, first, all textual substitutions are replaced with their proper values by evaluating against your data flow properties:
true and not (false or false or false)
- Next, the expression is evaluated using the order of operations. While "not" is usually evaluated before "or" and while "and" is usually evaluated at the same time as "or", the parentheses in this example force the evaluation to the "or"s first. In this case, it starts with the first "or" it finds as it moves from left to right. Since "false or false" evaluates to false, the first "or" expression is replaced with false:
true and not (false or false)
- This process is repeated for the next "or" expression:
true and not (false)
- Since there is now nothing in the parentheses other than a simple value, the parentheses are removed:
true and not false
- Next is the "not" operator:
true and true
- Finally, "and" is evaluated. Since "true and true" is true, our whole expression evaluates to true:
true
Example 2
"{{^PlanPrefix^}}" != "NY" and "{{^PlanPrefix^}}" != "NJ" and not {{^RemoveCodes^}}
- In this example, first, all textual substitutions are replaced with their proper values by evaluating against your data flow properties:
"MA" != "NY" and "MA" != "NJ" and not true
- Since this expression does not have any parentheses, the next operator to be evaluated is "not". Since "not true" evaluates to false, it is replaced with "false":
"MA" != "NY" and "MA" != "NJ" and false
- Next are the two != operators which are evaluated from left to right in order of appearance:
true and "MA" != "NJ" and false
- Then:
true and true and false
- Finally, the "and" operators are evaluated from left to right. First, "true and true" is evaluated to true:
true and false
- Then "true and false" is replaced with false:
false