Technical data
Chapter 10 Creating Rules, Formulas, and User Functions
Logical Operators
A logical opera
tor determines whether a condition is true. This table describes the logical operators:
Logical Operator Meaning Syntax
.NOT.
Condition is not True. .NOT. Condition
.AND.
Condition1 is True and
Condition2 is True.
Condition1 .AND. Condition2
.OR.
Condition1 is True or
Condition2 is True.
Condition1 .OR. Condition2
Compound Conditions
Ac
ompound condition tests whether some combination of conditions is true by combining two or more
co
mparisons or truth functions using logical operators.
The analytic calculation engine evaluates the .NOT. operator before the .AND. and .OR. operators, and
evaluates the .AND. and .OR. operators from left to right. You can override the precedence of the logical
operators with parentheses, just as you can with the mathematical operators. This table provides some
examples of compound conditions:
Example of Compound Condition Meaning of Compound Condition
SALES > 50000 .AND. ADVERTISING <⇒
10000
Returns True if SAL ES is greater than 50000 and
ADVERTISING is less than 10000.
CASH_REMAINING < 1000 .OR.⇒
PROJECT_DONE
Returns True if CASH_REMAINING is less than 1000 o r if
PROJECT_DONE is True.
.NOT. IS_FIRST .AND. .NOT. IS_LAST
Returns True if IS_FIRST is not True and IS_LAST is not True.
.NOT. (IS_FIRST .OR. IS_LAST)
Returns True if the condition (IS_FIRST or IS_LA ST ) is
not True. Note that this has the same effect as the previous
condition.
Predefined Constants
PeopleSoft Analytic Calculation Engine provides several predefined constants that you can use in rules. You
can use constants in the same way that you use numbers in rules. For example, you can test whether a data
cube equals the constant, or you can return the constant as a result.
This table describes predefined constants:
Copyright © 1988-2007, Oracl e. All rights reserved. 123