User`s guide
APPENDIX A Function Reference
User’s Guide 177
Script functions
uEvaluate
Description Evaluates a function or Java Script expression and returns the result.
Syntax string uEvaluate(expression)
Parameters
number expression
JavaScript code to evaluate.
Examples To evaluate functions and procedures:
uEvaluate(“if (IN.CUSTNO > 22) {return 22;} else {return
IN.CUSTNO;} )”) // Return IN.CUSTNO if IN.CUSTNO is
below 22 or return 22 if above.
You can also define your functions for later use. First, you evaluate the
following:
function myFunc(a ,b)
{ return a+b;
}
Then, call your function using uEvaluate:
uEvaluate("myFunc(3, 5)") // Returns 8
String functions
uAsc, uUnicode
Description Returns a Unicode character value of the first character. With the optional
parameter index, you can also return the code for a different character in the
string. The index parameter starts at 1.
Syntax number uAsc(value, index)