Logical Expressions
Logical expressions result in the value TRUE or FALSE. These are represented as integers where 0 is FALSE and anything else (usually 1) is TRUE. Logical expressions are normally used within IF THEN ELSE instructions and DO loops. They include:
- Expressions combined with the comparison operators. For example:
%%x = %%y > %%z
(%%x will be 1 (TRUE) if %%y is greater than %%z.)
%%x = %%y = %%z
(%%x will be 1 (TRUE) if %%y equals %%z)
- Expressions combined with the logical connectors. The AND and OR connectors combine two expressions, while the NOT connector negates the single expression following it. For example:
%%x = %%y AND %%z
(%%x will be 1 (TRUE) if both %%y and %%z are TRUE (not 0)).
- A logical function. For example:
%%x = CHANGED(%%y)
(%%x will be either 1 (TRUE) or 0 (FALSE)).
EngageOne™ Enrichment automatically converts string expressions to numeric expressions and vice versa. Therefore, you can use any field variable as a number or use numeric calculations as strings.