DataPool User Guide
Version 2.13 | Published November 30, 2018 ©
DataCondition
DataCondition evaluates the value of the DataField it is registered to using a defined comparison function and executes an action accordingly.
Unique Parameters
-
Format: Defines the way incoming data is handled. Data can be used as a number, string, a set of X Y values or a set of X Y Z values. The following table shows how the different formats are evaluated. Cells filled with EVAL are evaluated by the selected operator. Cells filled with TRUE always return true. Cells filled with FALSE always return false. Other text in a cell shows the behavior of the chosen operator.
Note: The X Y and X Y Z formats only support equal to (=) and not equal to (!=).
<
>
<=
>=
=
Number
EVAL
EVAL
EVAL
EVAL
EVAL
Text
EVAL
EVAL
EVAL
EVAL
EVAL
X Y
FALSE
!=
=
TRUE
EVAL
X Y Z
FALSE
!=
=
TRUE
EVAL
-
Number: Performs a simple numeric evaluation.
-
Text: Performs an alphanumeric evaluation.
-
X Y: Calculates the sum of the absolute value of the difference between the first and second values of the arguments and compares it to the precision value multiplied by two: |x1 - x2| + |y1 - y2| < 2 * precision.
-
X Y Z: Calculates the sum of the absolute value of the difference between the first, the second and the third values of the arguments and compares it to the precision value multiplied by three: |x1 - x2| + |y1 - y2| + |z1 - z2| < 3 * precision.
-
-
Condition: Specifies the evaluation function to apply. Evaluation is done left to right (incoming data is placed at the left side of the comparison operator). True always runs the action and False always runs the else action (if enabled). The If option evaluates the DataField value: i.e. all values other than zero runs the action, zero runs the else action. Between checks if the value is greater or equal (>=) than the first and lower (<) than the second argument.
-
Arguments: Defines the expression that is compared to the incoming data. An argument can be a constant (i.e. a fixed number/text) or a data field value. To specify a data field value as an argument, use the following syntax: $(DataFieldName).
-
Compare Vectors: Defines incoming data as a vector (an array of DataFields with definition of the number of items) and the argument expression is taken to be a vector of data when set to On. The comparison is then done item by item and the action is executed accordingly on each of the children. If this parameter is Off then each item in the incoming data is compared against one single argument.
-
Precision: Affects the evaluation of X Y and X Y Z formats only. It defines the margin in which the evaluation results as true (see X Y or X Y Z format explanation).
-
Do Once On Change: Triggers an Else action. When set ON, only if the condition result was changed, i.e. if it was changed from true to false or vice versa, the action (or Else action) is triggered. When set Off, every time the condition is checked the action (or Else action) is triggered accordingly.
-
Action: Specifies the action to invoke. If the action string begins with 0, then the command is handled as a Viz command and sent directly to Viz Engine, otherwise it is considered to be a DataPool command. The action can contain more than one command to be called. The commands must be separated by semicolons (;). Expressions can be used in the action utilizing the special DataPool variables.
-
Else: Enables the Else action when set to On. When an else action is defined it is executed if the evaluation result is false. When set Off, the Else action field is disabled and no action is executed when the evaluation result is false.
-
Else Action: Defines the action to execute if the evaluation result is false.