The built-ins in the following table work when the input data contains multiple
values (an array or list of strings). For arrays of objects with sub-fields, see
MR Built-ins for
Advanced Multi-Valued Fields.
| Built-in Name | Arguments | Outputs | Example |
|---|---|---|---|
[] (array index) | Integer index (zero-based) | Element at the specified index | orgs[0] |
calcGradYear | (Optional) Cut-off month for school year rollover. The default is
6. | Projected graduation year based on the input grades, in CEDS format | grades.calcGradYear() |
contains | Element to look for | true if the input contains any element that
exactly matches the argument, false
otherwise | if (roles.contains("administrator")) "staff" else roles |
containsAny | Any number of elements to look for | true if the input contains even one of the
specified arguments exactly, false otherwise | if (roles.containsAny("administrator", "teacher", "staff")) "staff" |
containsExactly | Any number of elements to look for | true if the input contains exactly and only the
specified arguments, false otherwise | if (locations.containsExactly("District Office")) "District Staff" else "School Staff" |
isListEmpty | None | true if the list has no elements. This built-in handles null
and empty lists. It also works on advanced multi-valued
fields. | if (teacherGroups.isListEmpty()) "student" else "staff" |
isListNotEmpty | None | true if the list has at least one element. This built-in handles
null and empty lists. It also works on advanced multi-valued
fields. | when { teacherGroups.isListNotEmpty() -> "staff" else -> "student" } |
listCount | None | The number of elements in the list | roles.listCount() |
Note:The single-valued
isEmpty() and isNotEmpty()
built-ins operate on string fields. Use isListEmpty() and
isListNotEmpty() for multi-valued fields. These built-ins correctly
distinguish between a field that is absent from the source record and a field that is
present but contains zero elements.