Use Variables in Aggregate Functions (not just fields)

Idea created by beverly Expert on May 5, 2017
    Active
    Score14

    Given:

    https://www.filemaker.com/help/15/fmp/en/index.html#page/FMP_Help/aggregate-functions.html

    Aggregate functions

    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

    .

    Desired:

    change the "field(s)" to "field(s) or variable(s)"

     

    Why?

    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:

    https://www.filemaker.com/help/15/fmp/en/index.html#page/FMP_Help/list.html

    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!

     

    Example:

    Let (

        [ _mylist = List ( 1 ; 2 ; 3 ; 4 )

        ; _return = Average ( _mylist )

        ]; _return

        ) // ERROR: <Field Missing>

    Why not?

    Yes, there are custom functions. Yes, there are ways to use external (i.e. Javascript). Yes, there are plug-ins.

     

    Just posting an idea.

    beverly