contents.gifindex.gifprev1.gifnext1.gif

Rules_Eval

Purpose

Within the context of the Rules Engine, <expr> is evaluated and the result is returned.

Arguments

Rules_Eval( <expr> )

Notes

To use this function to its full potential, <expr> should be a memory variable or a field in a table (such as the result of a call to Cust_Rcrd_Value()). <expr> may be as complex as you want and can contain references to memory variables and/or fields in tables.

If <expr> contains a bracketed list, then the function returns the result of the last item in the list. If other list items contain Assign_To functions, these functions are performed and consequently the assignments are made.

Syntax checking is done at run-time which does incur a slight performance penalty.

Example

Rules_Eval(

Assign_To( 'Rt_Base_Freight_Rate_Expr'

, Tbl_lookup_Val( "Rt_table"

, "Rt_tbls"

, FB![VEND_LABL]

, "Rt_Rate_Expr" )

)

)

In this example the result of Tbl_Lookup_Val is assigned to the memory variable Rt_Base_Freight_Rate_Expr (by the Assign_To function). The Rules_Eval function will return the output of the Assign_To.