EvalArray
The EvalArray function evaluates an expression by using the specified array.
Syntax
The EvalArray function
has the following syntax:
Integer | Float | String | Boolean = EvalArray(Expression, Array)Parameters
The EvalArray function
has the following parameters.
Parameter |
Format |
Description |
|---|---|---|
|
String |
Expression to evaluate. |
|
array |
Array to use in evaluating the expression. |
Return value
Result of the evaluated expression.
Note: In JavaScript,
Integers return
as Float instead of integers, for example 1 is 1.0.Example
The following example shows how to evaluate an expression using the given array.
MyNode1 = NewObject();
MyNode1.Name = "ORA_01";
MyNode1.Location = "New York";
MyNode2 = NewObject();
MyNode2.Name = "ORA_02";
MyNode2.Location = "New York";
MyNodes = {MyNode1, MyNode2};
MyEval = EvalArray('"Name: " + Name + ", Location: " + Location', MyNodes);
Log(MyEval);This example prints the following message to the policy log:
Parser Log: Name: ORA_01, Location: New York, Name: ORA_02, Location: New York