Substituting Boolean properties - Data360_Analyze - 3 - 3.12

Data360 Analyze Server Help

Product type
Software
Portfolio
Verify
Product family
Data360
Product
Data360 Analyze
Version
3.12
Language
English
Product name
Data360 Analyze
Title
Data360 Analyze Server Help
Copyright
2023
First publish date
2016
Tip: If you are not yet familiar with how you can use derived property values across your data flows, see Using derived property values.

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

not ({{^UseDatabase^}} or {{^DiskFull^}})

not ({{^UseProvisionalPricing^}} and {{^UseOfferPricing^}})

"==" and "!="

Binary operators that test for string equality and inequality in Boolean parameters. == tests for equality != tests for inequality

Examples

"{{^CustomerType^}}" == "Corporate"

"{{^PlanPrefix^}}" != "NPR"

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

Note: You must use double quotes when referencing string properties. You do not need to use double quotes when referencing Boolean properties.

{{?PlanPrefix?}} and not ({{^HonorDiscounts^}} or {{^HonorSales^}} or {{^HonorLocalPricing^}})

  1. 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)

  2. 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)

  3. This process is repeated for the next "or" expression:

    true and not (false)

  4. Since there is now nothing in the parentheses other than a simple value, the parentheses are removed:

    true and not false

  5. Next is the "not" operator:

    true and true

  6. Finally, "and" is evaluated. Since "true and true" is true, our whole expression evaluates to true:

    true

Tip: The Review tab shows a read-only view of all the fully evaluated property values for the selected node.

Example 2

"{{^PlanPrefix^}}" != "NY" and "{{^PlanPrefix^}}" != "NJ" and not {{^RemoveCodes^}}

  1. 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

  2. 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

  3. Next are the two != operators which are evaluated from left to right in order of appearance:

    true and "MA" != "NJ" and false

  4. Then:

    true and true and false

  5. Finally, the "and" operators are evaluated from left to right. First, "true and true" is evaluated to true:

    true and false

  6. Then "true and false" is replaced with false:

    false