In Mirata, array, list and Data Table are three distinct concepts that are often confused because all three involve repeating rows of data. They belong to different layers of a form: an array is part of the data model, a list is a way of displaying one, and a Data Table is a dataset stored outside the form entirely. Which layer a term refers to determines where its settings live and which parts of the platform can reach it.
Array
An array is a field type. It defines a repeating collection within a form's data model, and its structure is declared by a contained row type listing the fields that make up one row. An array holds the data and specifies nothing about appearance.
Because an array is a field, calculations address it the way they address any other field. Fields inside an array resolve by their bare name when referenced from a calculation in the same row, and by an absolute path from outside it. See Position-Based Calculations for reaching a specific row, and Understanding the Calc Editor for path behavior generally.
List
A list is a presentation control. It renders an array on screen, and each row is rendered by a paired list-item control. The list is where display concerns are configured: column widths, labels, and which of the row's fields appear in what order. An array with no list control has data but no visible rows.
A list of strings is not an array
Inside the Calc Editor, list has a second and unrelated meaning: a flat sequence of text values rather than a rendered control. Expressions such as List-Includes-String and Join-List-Of-Strings operate on that kind of list. A list of strings cannot be rendered as rows. Where either reading is possible, say "list control" or "list of strings" rather than "list" alone.
Data Table
A Data Table is a dataset stored at the organization level, outside any form, and managed in the Admin Tool. It is addressed by an identifier rather than by a field path, which is what separates it from both concepts above. An array belongs to one form instance, while a Data Table is shared, centrally maintained, and readable by many forms. See Data Tables in the Admin Tool.
A Data Table is not the same thing as the Table component. The Table component is one of the controls in the Designer's Data Groupings palette, alongside List, Grid, Read-only Grid and Associated Form List, and it renders data held in the form. The similarity of the names is the most common source of confusion here, so name either one in full, as "the Table component" or "a Data Table", and never as "table" alone.
A Data Table is also distinct from an option set typed directly into a field. Both supply choices to a dropdown, but only the Data Table is centrally maintained. An inline option set is part of the form definition and has to be edited form by form.
How the three combine
The three layers compose in a small number of configurations, and naming the layers makes the differences unambiguous.
An array rendered by a list control, filled in by the person completing the form, is the ordinary repeating section: line items, inspection findings, photographs with captions. This is the arrangement behind Image Grid and Using Array's "Selection Field" for Selected Row.
An array rendered by a list control but populated from a Data Table produces the same visible rows without manual entry, and suits centrally maintained content such as a standard checklist or parts list. The procedure, including the requirement that field names match column names, is in Pull Data from Data Table into Form List.
A dropdown whose options come from an array elsewhere on the same form involves no repeating display at all. The array supplies the values and the dropdown is a single-select field. See Dropdown from List. Where the options are centrally maintained instead, the source is a Data Table: see Source Dropdown Fields From a Data Table.
Working with rows
The selection property of a list control can be mapped to an integer field outside the array, which then holds the index of the row currently in focus. Using Array's "Selection Field" for Selected Row describes the arrangement.
Reading a value from a particular row, whether the first, the last, a fixed position, or the row currently selected, is covered by Position-Based Calculations. The underlying expressions are Current-Position and Current-Position-One-Based, which report a row's own index from within that row.
Summarizing across rows
Aggregating every row of an array is possible, but the expressions that do it are not grouped under an array heading in the Calc Editor. They are filed by the type each one returns, which is why searching for array functions does not find them.
Expression | Returns | Purpose |
|---|---|---|
| integer | Number of rows where a boolean column, its filter, is true. |
| integer | Number of rows, whatever they contain. |
| number | Total of a numeric column across all rows. |
| decimal | Mean of a numeric column. |
| number | Extremes of a numeric column. |
| boolean | Combines a boolean column into a single result. |
Counting rows and counting a list are different expressions
Count-In-Array counts rows of an array. Count-Where-True counts the true results in a list of booleans, which is a different value kind from an array. If you are working across the rows of an array, Count-In-Array is the one you want.
An empty array does not give every reducer a zero
Over an array with no rows, Length-Array and Count-In-Array return 0, but Sum-Array-Integers returns no value at all rather than 0, and And-Array-Booleans does not come back true. Do not assume a reducer over an empty array gives you a neutral number.
Each takes the array as one operand and a per-row expression as the other, evaluating that expression once per row. This is the only construct in the Calc Editor that iterates, and there is no general-purpose loop. See Calc Editor: Decimal and Integer Expressions and Calc Editor: Boolean Expressions for the full tables.
Associated Form List
The Designer's Data Groupings palette lists Associated Form List as returning an array, described there as "list of associated forms". It sits alongside List, Grid, Read-only Grid and Table as a fifth presentation control. See Associated Form List.