contents.gifindex.gifprev1.gifnext1.gif

Rules_Eval_List

Purpose

Evaluates one expression in a list expressions indicated by an ordinal.

Arguments

Rules_Eval_List(

<expr list> // A bracketed list of expressions.

, <ordinal> // An ordinal identifying which expression in the list you want evaluated.

)

Notes

If there are seven expressions and <ordinal> is 6, the function will return the result of the sixth expression in the list.

Example

In this example, there are nine expressions in the list. The results of the ninth expression is returned. Expression one to eight all have Assign_To functions. These assignments will be effected.

Rules_Eval_List(

" //Begin expression list

[Assign_To('Tmp_Orig_Key'

,'['&Left(FB![AL_POST_CODE_ORIG],5)&'][ALL]')]

[Assign_To('Tmp_Dest_Key',

'[ALL]['&Left(FB![AL_POST_CODE_DEST],5)&']')]

[Assign_To('Tmp_Orig_Vector'

,Tbl_Lookup_Val(FB![VEND_LABL]&' Loc Adjust Table'

,FB![VEND_LABL],Tmp_Orig_Key,'Arb_tbl_rsgn'))]

[Assign_To('Tmp_Dest_Vector'

,Tbl_Lookup_Val(FB![VEND_LABL]&' Loc Adjust Table'

,FB![VEND_LABL],Tmp_Dest_Key,'Arb_tbl_rsgn'))]

[Assign_To('Tmp_Orig_Adj'

,Tbl_Lookup_Val(FB![VEND_LABL]&' Loc Adjust'

,FB![VEND_LABL],Tmp_Orig_Vector,Rt_Col_Key))]

[Assign_To('Tmp_Dest_Adj'

,Tbl_Lookup_Val(FB![VEND_LABL]&' Loc Adjust'

,FB![VEND_LABL],Tmp_Dest_Vector,Rt_Col_Key))]

[Assign_To('Tmp_Orig_Adj_Amt'

,IIF(Left(Tmp_Orig_Adj,1)='*'

,Rt_Base_Freight_Rate*CCur(CDbl(LDrop(Tmp_Orig_Adj,1)))

,CCur(LDrop(Tmp_Orig_Adj,1))))]

[Assign_To('Tmp_Dest_Adj_Amt'

,IIF(Left(Tmp_Dest_Adj,1)='*'

,Rt_Base_Freight_Rate*CCur(CDbl(LDrop(Tmp_Dest_Adj,1)))

,CCur(LDrop(Tmp_Dest_Adj,1))))]

[ConvertNulls(Tmp_Orig_Adj_Amt,0)+ConvertNulls(tmp_Dest_Adj_Amt,0)]

" // End expression list.

,9)