Boolean

Extended supports booleans, and these can be used via the constants True and False. Boolean properties and conditional statements will always evaluate to True or False. Booleans can be used for filtering, querying, and conditional statements.

True                    // True
var := False
var                     // False
1 = 1                   // True
myName := "Revenue"
myName = "Revenue"      // True

myKpi := t.KP001
myKpi.approved          // True if the "approved" property of the KPI is checked, otherwise false

Logical Operators

The following logical operators are supported by Extended:

Operator

Definition

AND

True if both sides evaluate to true, otherwise false

OR

True if either side evaluates to true, otherwise false

NOT

Inverts the value of CONTAINS and IN operators. Not supported for other uses.

Operator Precedence

  1. () Parentheses can be used to wrap expressions and calculate them first.

  2. AND

  3. OR

If multiple operators with the same precedence are present, they will be evaluated left-to-right.

Truth Table

Input

Output

True AND True

True

True AND False

False

False AND False

False

True OR False

True

True OR True

True

False OR False

False

Relational Operators

The following relational operators are supported by Extended:

Operator

Definition

>

Greater than

<

Less than

>=

Greater than or equal to

<=

Less than or equal to

=

Equality (equal to)

!= (or <>)

Inequality (not equal to)

CONTAINS

True if the list on the left contains the element on the right

IN

True if the element on the left is within the list on the right

Special Booleans

There are several special access boolean properties that contain information on the visibility and scope of an object. These booleans can help include/exclude non-visible objects, or expired objects in your code.

Boolean Property

Definition

visible

True if the object is visible

inheritVisible

True if the object, and all its parent objects are visible

inScope

True if the object’s lifetime is within the current period

inheritScope

True if the lifetime of the object and all of its parents are within the current period

available

True if the object is visible and inScope

inheritAvailable

True if the object and all of its parents are visible and inScope

Examples

myScorecard := t.NOT_VISIBLE_SCORECARD              // Scorecard that is not visible, and has no start/end dates
myScorecard.visible                                 // False
myScorecard.available                               // False
myScorecard.inScope                                 // True

oldPerspective := t.OLD_PERSPECTIVE                 // Perspective that is visible, with lifetime ended in 1776
oldPerspective.visible                              // True
oldPerspective.available                            // False
oldPerspective.inScope                              // False

myKpis := SELECT Kpi WHERE inheritScope             // The Kpis under oldPerspective would be excluded
myKpis                                              // since one of their parents (oldPerspective) is expired

SELECT Kpi WHERE available                          // All the Kpis that are visible and inScope