Description
The MIN
function finds the minimum number or date in a subform's field or in two or more fields.
Usage
MIN(VALUE1, VALUE2, VALUE3, ...)
MIN(SUBFORM_FIELD.FIELD_NAME)
Remarks
When used with subform fields, the argument to MIN()
must include a reference to the form's subform field and then the field within the subform, using the dot notation.
The MIN
function accepts arguments with the following types:
- Number
- Text
- Instant
- Date
- Week
- Month
When comparing text, the comparison is case sensitive. That means that "ABC"
does not equal "abc"
.
Examples
Check for presence of children in a household
If you have a household survey form with a "Members" subform, you can use the MIN
function to find the minimum age of the members. You can use this as part of a relevance rule to show some questions that are only relevant if there are children in the household:
MIN(MEMBERS.AGE) < 18
Find the first of two dates
If you have a form with two date of fields, such as SCHOOL_ENROLLMENT_DATE
and PROGRAMME_INTAKE_DATE
, you can find the date that occurred first using the MIN function:
MIN(SCHOOL_ENROLLMENT_DATE, PROGRAMME_INTAKE_DATE)