Database Column calculations

There are several zMUD functions that loop through a specific column in a view automatically and compute a result. The first argument to these functions is the name of the Column (field) to loop through. The second argument is optional and specifies the View|Database name to use. If missing, the current view and database is used. A complete list of these functions are:

%sum      Returns the sum of each value in the column
%average      Returns the average value of the column
%stdev      Returns the standard deviation of the column
%count      Returns the number of non-empty values in the column
%dbmin      Returns the minimum value of the column (and sets %rec to that record)
%dbmax      Returns the maximum value of a column (and sets %rec to that record)
%dblist      Returns each value in the column as a string list

For example, %sum(Hit) would return the sum of the Hit field for all records in the View. %dblist(Name) would return a string list of all of the record names in the current view. For the most part, these formulas are intended for use in a pivot table (see Advanced Database usage), but can be used for any other purposes.



Contents Accessing Records in a View Creating New Records