Skip to content

Matrix Column Schema

Matrix column objects define the fields shown across each row in matrixdropdown and matrixdynamic questions.

{
"name": "quantity",
"title": "Quantity",
"cellType": "text",
"inputType": "number",
"isRequired": true
}
  • Type: string
  • Required: Yes

Stored key for this column inside each matrix row value.

  • Type: string
  • Localizable: Yes

Visible column label.

  • Type: string
  • Allowed values: dropdown, checkbox, radiogroup, tagbox, text, comment, boolean, expression, rating, slider

Question type used inside cells for this column. Overrides the matrix-level cellType.

  • Type: choiceitem[]

Choices for dropdown, checkbox, radiogroup, or tagbox cells.

  • Type: string

Input type for text cells, for example text, number, email, or date.

  • Type: expression

Expression used by columns with cellType: "expression". Use row-scoped placeholders such as {row.quantity} and {row.unitPrice}.

  • Type: boolean

Requires a value in this column.

  • Type: boolean

Requires each row to provide a unique value in this column.

  • Type: condition

Controls column visibility.

  • Type: string
  • Allowed values: none, sum, count, min, max, avg

Aggregation method used to calculate this column’s footer total.

  • Type: expression

Expression used to calculate the column total. Overrides totalType.

  • Type: string

Display pattern for a column total. Use {0} as the total value placeholder.

  • Type: string
  • Allowed values: none, decimal, currency, percent

Number format used for the calculated total.

  • Type: string

Currency code used when totalDisplayStyle is currency.

  • Type: number

Minimum number of decimal digits for the total.

  • Type: number

Maximum number of decimal digits for the total.

  • Type: string
  • Allowed values: left, center, right, auto

Alignment for the calculated total.

  • Type: string

Column width in CSS units.

  • Type: string

Minimum column width in CSS units.

{
"type": "matrixdynamic",
"name": "lineItems",
"title": "Line items",
"columns": [
{ "name": "item", "title": "Item", "cellType": "text", "isRequired": true },
{ "name": "quantity", "title": "Quantity", "cellType": "text", "inputType": "number" },
{ "name": "unitPrice", "title": "Unit price", "cellType": "text", "inputType": "number" },
{
"name": "lineTotal",
"title": "Line total",
"cellType": "expression",
"expression": "{row.quantity} * {row.unitPrice}",
"totalType": "sum",
"totalDisplayStyle": "currency",
"totalCurrency": "USD"
},
{
"name": "priority",
"title": "Priority",
"cellType": "dropdown",
"choices": ["Low", "Medium", "High"]
}
]
}