Expression

The Expression object is intended for obtaining information about the expression being executed at the moment.

Fields

Name

Description

id

Contains ID (name) of the expression (string).

uid

Contains global ID of the expression (string).

path

Contains path to the expression (string).

currentState

Contains an object of ValueState type and is the result of the last execution of the expression.

comment

Contains a comment for the expression.

Examples

In the following example, all expressions located in the Alarms → Area1 group will return True, the rest will return False.

if (context.expression.path.startsWith('Alarms.Area1'))
  return false;
return true;

In the example below, the expression will return True if the previous result was False, otherwise it will return True.

if (context.expression.currentState.value == false)
  return true;
return false;

Last updated