#### Minimum

##### Minimum(a[ ])

This function returns the lowest value in an array.

Parameter

a - An array which type can be Number.

Return value

Returns a Number value.

Examples

- `Number x = Minimum([ 2.36, 0.12, 1.25, 0.25 ])`
- `Number x = Minimum([1.0, 2.0, 3.0, 4.5, 45.0, 67.0])`
- `Number x[6] = [1.0, 2.0, 3.0, 4.5, 45.0, 67.0];
  Number y = Minimum(x)`

##### Minimum(DBField a)

This function is used to pick up the minimum value from the values referred to by the argument.

Parameter

a - Values of a DBField or a formula field.

Return value

The returned value type is dependent on the data type of the parameter. It can be Number, Currency, String, Date, Time, DateTime or Boolean.

Examples

- `Number x = Minimum(@dbfield)`
- `Date x = Minimum(@formula)`
- `Currency x = Minimum(@dbfield)`
- `Boolean x = Minimum(@formula)`

##### Minimum(DBfield a, String groupby)

This function is used to pick up the minimum value from the values referred to by the first argument.

Parameters

- a - Values of a DBField or a formula field.
- groupby - A constant string to indicate the DBField name, formula or parameter grouped by.

Return value

The returned value type is dependent on the first argument. It may be Number, Currency, String, Date, Time, DateTime or Boolean.

Examples

- `Time x = Minimum(@dbfield, @dbfield_groupby)`
- `DateTime x = Minimum(@dbfield, @dbfield_groupby)`
- `String x = Minimum(@dbfield, @parameter_groupby)`
- `Date x = Minimum(@formula, @formula_groupby)`
- `Currency x = Minimum(@formula, @dbfield_groupby)`
- `Currency x = Minimum(@formula, @parameter)`

Note: If a field 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.`