Functions Reference

Table Of Contents
Chapter 2
|
Aggregate functions 11
Examples
A Student table has a portal showing scores for all exams a student has taken. The exam
scores are in a table called Exams.
Average(Exams::Score) returns the student’s average score for all exams she has
taken.
In the following examples:
• Field1 contains two repetitions with values of 1 and 2.
• Field2 contains four repetitions with values of 5, 6, 7, and 8.
• Field3 contains 6.
Average(Field2) returns 6.5 when the calculation isn’t a repeating field.
Average(Field1;Field2;Field3) returns 4, 4, 7, 8 when the calculation is a
repeating field.
Note When a referenced field is a repeating field, the Average function returns the
average of the values in the first repetition field, then the average of the values in the
second repetition field, and so on. Therefore, (1+5+6)/3=4;(2+6)/2=4;7/1=7;8/1=8.
Count
Format
Count(field{;field...})
Parameter
field - any related field, repeating field, or set of non-repeating fields; or an expression
that returns a field, repeating field, or set of non-repeating fields.
Parameters in curly braces { } are optional.
Data type returned
number