Note Aggregate functions perform statistical analysis on numbers (and dates or times for some functions) in:
- several fields in a record.
- related fields whether displayed in a portal or not.
- repeating fields
change the "field(s)" to "field(s) or variable(s)"
There are many times that the built-in aggregate functions do the job, but only when the data is in a field. This idea may be prohibitive, but if so, please reply with a why!
List() is considered an 'aggregate' and allows variables:
field - any related field, repeating field, or set of non-repeating fields; an expression that returns a field, repeating field, or set of non-repeating fields, or a variable.
So? allow the other aggregates use variables!
[ _mylist = List ( 1 ; 2 ; 3 ; 4 )
; _return = Average ( _mylist )
) // ERROR: <Field Missing>
Just posting an idea.