Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Learn more about the logical functions AND, OR, TRUE, FALSE, NOT, UNKNOWN. 

Table of Contents
Panel
bgColorwhite

AND

This function returns TRUE if all its arguments evaluate to TRUE; it returns FALSE if one or more arguments evaluate to FALSE.

Syntax

Code Block
argument1 AND argument2 [AND ...]
  • argument1 - The first boolean condition that you want to evaluate.
  • argument2 - The first boolean condition that you want to evaluate.
  • [AND …] - Additional boolean conditions that you want to evaluate. (optional)

Return type

  • boolean

Examples

ExpressionResultTypeTRUE AND TRUETRUEBooleanTRUE AND FALSE

FALSE

BooleanTRUE AND ? (= UNKNOWN)UNKNOWNBooleanFALSE AND ? FALSEBoolean Include Page

Include Page
DOC:Logical function: AND
DOC:Logical function: AND


Include Page
DOC:Logical function: OR
DOC:Logical function: OR


Include Page
DOC:Logical function: NOT
DOC:Logical function: NOT


Include Page
DOC:Logical function values: TRUE, FALSE, UNKNOWN
DOC:Logical function values: TRUE, FALSE, UNKNOWN

_nav_BackToTop_nav_BackToTop Panel
bgColorwhite

OR

This function returns TRUE if at least one of its arguments evaluates to TRUE; it returns FALSE if none of the arguments evaluate to TRUE.

Syntax

Code Block
argument1 OR argument2 [OR ...]

argument1 - The first boolean condition that you want to evaluate. argument2 - The first boolean condition that you want to evaluate. [OR …] - Additional boolean conditions that you want to evaluate.

Return type

  • boolean

Examples

ExpressionResultTypeTRUE OR TRUE

TRUE

BooleanTRUE OR FALSETRUEBooleanFALSE OR FALSEFALSEBoolean

TRUE OR ? (= UNKNOWN)

TRUEBooleanFALSE OR ? (= UNKNOWN)UNKNOWNBoolean Include Page_nav_BackToTop_nav_BackToTop Panel
bgColorwhite

TRUE

This is the boolean value TRUE.

Include Page_nav_BackToTop_nav_BackToTop Panel
bgColorwhite

FALSE

This is the boolean value FALSE.

Include Page_nav_BackToTop_nav_BackToTop Panel
bgColorwhite

NOT

This operator reverses the value of its boolean argument.

Syntax

Code Block
NOT argument
  • argument - The boolean condition of which you want to reverse its value.

Return type

  • boolean

Examples

ExpressionResultTypeNOT (TRUE)FALSEBooleanNOT (TRUE AND FALSE)TRUEBooleanNOT ( ? (= UNKNOWN) )UNKNOWNBooleanNOT (NOT (TRUE))TRUEBoolean
Tip

Using brackets is not required, but advised to clearly indicate which boolean condition needs to be reversed.

Include Page_nav_BackToTop_nav_BackToTop Panel
bgColorwhite

UNKNOWN

You can use the '?' (question mark), representing UNKNOWN, to check if an expression or an attribute has a value.

Example

Suppose a model with an entity Person and attributes Person.name and Person.age. In runtime, a user fills out a form and enters his name, but forgets to fill out his age.

As a result:

ExpressionResultTypeReasonPerson.name = ?FALSEBooleanThis attribute is filled outPerson.age = ?TRUEBooleanThis attribute is not filled out, and therefore UNKNOWN Include Page_nav_BackToTop_nav_BackToTop