


Collection_Calc
| Collection_Calc(
|
|
| <coll spec>
| // A Collection_Create function, or the name of a memory variable in single quotes.
|
| , <attribute_list>
| // Bracketed list of attributes.
|
| )
|
|
Collection_Calc
(Collection_Create
('', 'FB_LN', 'SELF![CAT]="FREIGHT"'
,'[CMDTY_CLASS]
[Quantity:CLng(ConvertNulls(SELF![QTY_LABL],0))]
[CAT][Line_Num:SELF![LINE_ITEM_NUM]]
')
,'[Line_Num:SELF![Line_Num]*SELF![Line_Num]]
[New_Col:SELF![Line_Num]*SELF![Line_Num]]
')
In this example, a Collection_Create is used as the first argument to specify the collection on which Collection_Calc operates.
The second argument is a two-item list:
[Line_Num:SELF![Line_Num]*10]
[New_Col:SELF![Line_Num]*SELF![Line_Num]]
The expression to the right of the colon defines the value which will be given to the attribute. "SELF!" refers to the collection we are creating from. The first list item gives a new value to the exisiting attribute "Line_Num"; the second specifies a new attribute, "New_Col", and an expression for its value.
| <attribute_list>
| Each item in the list takes the form [<name>: <val expr>]
|
| <name>
| The name of an existing attribute, or of a new attribute. The result of <val expr> is assigned to the attribute.
|
| SELF!
| SELF! in <val expr> refers to the Collection specified in the first argument.
|