Write, Bureaucrats, Administrators
4,332
edits
mNo edit summary |
mNo edit summary |
||
Line 367: | Line 367: | ||
Note that the function parameters are specified in single quotes. | Note that the function parameters are specified in single quotes. | ||
= | {| class="wikitable" | ||
Function Arguments Returns | ! Function !! Arguments !! Returns | ||
$ sum fields, operation (optional, used if multiple fields are specified) | |- | ||
fields | | $sum || fields, operation (optional, used if multiple argument fields are specified) | ||
| fields &{mdash;} the identifier of the field or attribute of the linked entry in the format: 'link_field_name.linked_field_name' | |||
: where link_field_name is the name of a Link to Entry field. | |||
: where linked_field_name is the name of a field of a linked entry. | |||
If multiple attributes are received from the linked entries, the paired operation is performed before the summation takes place. The function returns the summation. The type of paired operation is defined by the last argument of the function operation(). The type of paired operation is determined by the last argument of the function operation()and can be one of the following: | |||
* '@mul' - multiplication of fields (attributes). | |||
* '@add' - addition of fields (attributes). | |||
* '@sub' - subtraction of fields (attributes) from the field specified first. | |||
* '@div' is the division of the fields (attributes) into the field specified first. | |||
The operation() argument is optional. If it is not specified, then the multiplication operation is used as a default. | |||
|- | |||
| $avg || fields, operation || This function returns the average of values of field linked_field_name for all entries included into link_field_name. | |||
|- | |||
| $min || fields, operation || This function returns the minimum of values of field linked_field_name for all entries included into link_field_name. | |||
|- | |||
| $max || fields, operation || This function returns the maximum of values of field linked_field_name for all entries included into link_field_name. | |||
|} | |||
{{FieldNameHint}} | {{FieldNameHint}} | ||