Array

The Array functions are all used to summarize field data in several different ways.

Any()

Function

Description

This function is used to check whether there is at least one element in the argument is true. If there is, return true; if there isn't, return false.

Arguments

Return type

Returns a Boolean value.

Examples

Average()

Function

Description

This function is used to return the average value of a group of values referred to by the first argument. The second argument, if there is one, returns the group by field name.

Arguments

Return type

The result type relies on the first argument. It can be of the Number or Currency data type, if the data type of each element in the first argument is also of the Number or Currency data type respectively.

Examples

Note: If a field_variable is assigned to a variable, for example X, the variable X will lose the characteristic of representing a group of values. The following formula will then be treated as incorrect.

Number x = @dbfield;
Number y = Average(x); // system will prompt you that there is no such kind of function.

Count()

Function

Description

This function is used to count the number of a group of values referred to by the first argument. The second argument, if there is one, returns the group by field name.

Arguments

Return type

Returns a Number value.

Examples

Note: If a field_variable is assigned to a variable, for example X, the variable X will lose the characteristic of representing a group of values. The following formula will then be treated as in correct.

Number x = @dbfield;
Number y = Count(x); // system will prompt you that there is no such kind of function.

DistinctCount()

Function

Description

This function is used to count the number of distinct values referred to by the first argument together. The second argument, if there is one, gives the group by field name.

Arguments

Return type

Returns a Number value.

Examples

Note: If a field_variable is assigned to a variable, for example X, the variable X will lose the characteristic of representing a group of values. The following formula will then be treated as incorrect.

Number x = @dbfield;
Number y = DistinctCount(x); // system will prompt you that there is no such kind of function.

Every()

Function

Description

This function is used to check whether each element in the argument is true. If yes, return true; if not, return false.

Arguments

Return type

Returns a Boolean value.

Examples

Maximum()

Function

Description

This function is used to pick up the maximum value from a group of values referred to by the first argument. The groupby argument specifies the group by field name.

Arguments

Return type

The result type relies on the first argument. It may be Number, Currency, String, Date, Time, DateTime, or Boolean if the datatype of each element in the first argument is Number, Currency, String, Date, Time, DateTime or Boolean respectively.

Examples

Note: If a field_variable is assigned to another variable, for example X, the variable X will lose the characteristic of representing a group of values. The following formula will then be treated as incorrect.

Number x = @dbfield;
Number y = Maximum(x); // system will prompt you that there is no such kind of function.

Minimum()

Function

Description

This function is used to pick up the minimum value from a group of values referred to by the first argument together. The second argument, if there is one, gives the group by field name.

Arguments

Return type

The result type relies on the first argument. It may be Number, Currency, String, Date, Time, DateTime, or Boolean if the data type of each element in the first argument is Number, Currency, String, Date, Time, DateTime or Boolean respectively.

Examples

Note: If a field_variable is assigned to a variable, for example X, the variable X will lose the characteristic of representing a group of values. The following formula will then be treated as incorrect.

Number x = @dbfield;
Number y = Minimum(x); // system will prompt you that there is no such kind of function.

PopulationStdDev()

Function

Description

This function is used to find the population standard deviation of a group of values referred to by the first argument. The second argument, if there is one, gives the group by field name.

Arguments

Return type

Returns a Number value.

Examples

Note: If a field_variable is assigned to a variable, for example X, the variable X will lose the characteristic of representing a group of values. The following formula will then be treated as incorrect.

Number x = @dbfield;
Number y = PopulationStdDev(x); // system will prompt you that there is no such kind of function.

PopulationVariance()

Function

Description

This function is used to find the population variance of a group of values referred to be the first argument. The second argument, if there is one, gives the group by field name.

Arguments

Return type

Returns a Number value.

Examples

Note: If a field_variable is assigned to a variable, for example X, the variable X will lose the characteristic of representing a group of values. The following formula will then be treated as incorrect.

Number x = @dbfield;
Number y = PopulationVariance(x); // system will prompt you that there is no such kind of function.

StdDev()

Function

Description

This function is used to find the standard deviation of a group of values referred to by the first argument. The second argument, if there is one, gives the group by field name.

Arguments

Return type

Returns a Number value.

Examples

Note: If a field_variable is assigned to a variable, for example X, the variable X will lose the characteristic of representing a group of values. The following formula will then be treated as incorrect.

Number x = @dbfield;
Number y = StdDev(x); // system will prompt you that there is no such kind of function.

Sum()

Function

Description

This function is used to add a group of values (referred to by the first argument) together. The second argument, if there is one, gives the group by field name.

Arguments

Return type

The result type relies on the first argument. It may be Number or Currency if the data type of each element in the first argument is Number or Currency respectively.

Examples

Note: If a field_variable is assigned to a variable, for example X, the variable X will lose the characteristic of representing a group of values. The following formula will then be treated as incorrect.

Number x = @dbfield;
Number y = Sum(x); // system will prompt you that there is no such kind of function.

UBound()

Function

Description

This function is used to return the number of elements in an array.

Argument

Return value

Returns a Number value.

Examples

Variance()

Function

Description

This function is used to find the variance of a group of values referred to by the first argument. The second argument, if there is one, gives the group by field name.

Arguments

Return type

Returns a Number value.

Examples

Note: If a field_variable is assigned to a variable, for example X, the variable X will lose the characteristic of representing a group of values. The following formula will then be treated as incorrect.

Number x = @dbfield;
Number y = Variance(x); // system will prompt you that there is no such kind of function.