Cisco Cisco Unified Customer Voice Portal 11.0(1) Release Note

Page of 145
C
HAPTER 
17:
 
M
ATH
 
 
E
LEMENT 
S
PECIFICATIONS FOR 
C
ISCO 
U
NIFIED 
CVP
 
VXML
 
S
ERVER AND 
C
ISCO 
U
NIFIED 
C
ALL 
S
TUDIO 
 
 
 
 
69
 
 
Chapter 17: Math 
The Math action element is used to evaluate basic mathematical expressions.  The mathematical expression is composed of operators 
and functions in the form of a string which is passed as a setting to the element, parsed and evaluated at runtime.  The result is a 
double value stored as a string in either element data or session data. All common arithmetic operators are supported. Boolean 
operators are also fully supported. Boolean expressions are evaluated to be either 1.0 or 0.0 (true or false respectively). 
Examples  
 
Expression: 2 * 4 
 Result: 
8.0 
 
 
Expression: sqrt(16)  
 Result: 
4.0 
 
 
Expression: {Data.Session.myNumber} == 4 
 Result: 
1.0 
Settings 
Name (Label) 
Type 
Req’d 
Single 
setting 
value 
Substitution 
allowed 
Default 
Notes 
Type 
(Type) 
string 
enum 
Yes 
true false Element
This setting specifies the type of data that will 
store the result of the mathematical expression. 
Possible values are: Element | Session. 
Default = Element. 
Name 
(Name) 
string Yes 
true true  None 
This setting specifies the name to assign to the 
data that will store the result of the mathematical 
expression. 
Expression 
(Expression) 
string  
Yes 
true true  None 
This setting specifies the mathematical 
expression to parse and evaluate. For supported 
operators and functions see tables below.