EvaluateData

Purpose

Use EvaluateData to compare the value of one variable or constant to the value of another variable or constant.


A screen capture of the Action EvaluateData window

Description

The operation can be a numeric comparison or an alphanumeric comparison. Blueworx Voice Response uses ASCII sort order.

Parameters

The parameters for EvaluateData define the type of comparison and the two values to be compared. The parameters are the same for both Numeric and Alphanumeric comparisons.

Possible results

EvaluateData can have one of the following results:

Less Than
The value of Operand 1 was less than the value of Operand 2.
Equal To
The value of Operand 1 was equal to the value of Operand 2.
Greater Than
The value of Operand 1 was greater than the value of Operand 2.
Data Mismatch
The comparison was not performed because one of the values is the wrong type of data. For example, if you request a numeric comparison but one of the operands is a string variable, the result of the action is a data mismatch.
Not Evaluated
The action was not performed. The system logs this error, so the error log contains an explanation.

ASCII syntax

When using an ASCII editor, code this action with these parameters in the following order:

  1. "NUMERIC" or "ALPHANUMERIC"
  2. operand 1 (variable or constant)
  3. operand 2 (variable or constant)

For example:

label: "Check Edges"
	EvalData("NUMERIC", loc2_n, 4)
	  edge EDGE_LESS_THAN:			  less_than
	  edge EDGE_EQUAL:				   equal
	  edge EDGE_GREATER_THAN: 		  greater_than
	  edge EDGE_EVAL_MISMATCH:		  eval_mismatch
	  edge EDGE_NOT_COMPUTED: 		  not_computed
	;
	EvalData("ALPHANUMERIC", loc3_s, "hello");

The parameters and edges are described above under "Parameters" and "Possible results". For more information, see Testing a state table using the debugger.