You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 65 Current »

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

Overview

Function / valueDescription
ANDReturns TRUE if all its arguments evaluate to TRUE; it returns FALSE if one or more arguments evaluate to FALSE.
NOTReverses the value of its boolean argument.
ORReturns TRUE if at least one of its arguments evaluates to TRUE; it returns FALSE if none of the arguments evaluate to TRUE.
UNKNOWNUse the '?' (question mark), representing UNKNOWN, to check if an expression or an attribute has a value.
TRUEThis is the boolean value TRUE.
FALSEThis is the boolean value FALSE.

Functions

AND


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


Syntax

argument1 AND argument2 [AND ...]



Inputs
  • 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

ExpressionResultType
TRUE AND TRUETRUEboolean
TRUE AND FALSE

FALSE

boolean
TRUE AND ? (= UNKNOWN)UNKNOWNboolean
FALSE AND ? FALSEboolean




OR


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


Syntax

argument1 OR argument2 [OR ...]


Input

  • 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

ExpressionResultType
TRUE OR TRUE

TRUE

boolean
TRUE OR FALSETRUEboolean
FALSE OR FALSEFALSEboolean

TRUE OR ? (= UNKNOWN)

TRUEboolean
FALSE OR ? (= UNKNOWN)UNKNOWNboolean


Back to Top


NOT


Reverses the value of its boolean argument.


Syntax

NOT argument


Input
  • argument - The boolean condition of which you want to reverse its value.


Return type

  • boolean


Examples

ExpressionResultType
NOT (TRUE)FALSEboolean
NOT (TRUE AND FALSE)TRUEboolean
NOT ( ? (= UNKNOWN) )UNKNOWNboolean
NOT (NOT (TRUE))TRUEboolean


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


UNKNOWN


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:

ExpressionResultTypeReason
Person.name = ?FALSEbooleanThis attribute is filled out
Person.age = ?TRUEbooleanThis attribute is not filled out, and therefore UNKNOWN

TRUE


This is the boolean value TRUE.

FALSE


This is the boolean value FALSE.



  • No labels