---
title: "Matrix rule sets"
site: admin
version: 2027.1
versions: "all"
url: https://docs-new.servicely.ai/admin/2027.1/data-model/matrix-rule-sets/
type: reference
application: platform
last_updated: 2026-12-03
commit: 6777698daac5
---


A matrix rule set fills in one field on a form from the values of others, such as an incident's priority from its impact and urgency. This page lists its fields and the rule set Servicely ships, for administrators who change how a field is derived.

## How a rule set runs

Matrix rule sets are kept under **Data model → Validation & rules → Matrix rulesets**, in the Administration workspace. The Data model menu needs the `configuration_administrator` role.

<Image src="asset:screenshots/admin/data-model-matrix-rule-sets/matrix-rulesets-menu.png">The Matrix rulesets item in the Validation & rules section of the Data model menu.</Image>

<Image src="asset:screenshots/admin/data-model-matrix-rule-sets/new-matrix-rule-set.png">The empty Create Matrix rule set form, with the Matrix, Script and Data tabs.</Image>

| Behaviour | Detail |
| --- | --- |
| Where it runs | On the form, in the user's browser, as the user edits the record. |
| When it runs | When a source field changes, if **On change** is set. When the form opens, if **On load** is set. |
| Which tables | The table named on the rule set and every table that extends it. A rule set on a child table replaces one on its parent for the same source fields. |
| Who it runs for | Every user who can read the table, whatever their access to the rule set table. |
| Target field | Set to the result. With **Read only** set, users cannot change it by hand. |

## Matrix rule set fields

| Field | Type | What it holds |
| --- | --- | --- |
| Name | String | The name of the rule set. |
| Active | Boolean | Whether the rule set runs. |
| Type | Choice | How the target value is found. See the next table. |
| On load | Boolean | Run the rule set when the form opens. |
| On change | Boolean | Run the rule set when a source field changes. |
| Table | Table | The table the rule set applies to, with the tables that extend it. |
| Source fields | Field array | The fields the value is derived from. A matrix takes one, two or three. |
| Target field | Field | The field the rule set sets. |
| Read only | Boolean | Make the target field read only on the form. |

The form has three tabs for the rule itself. **Matrix** shows a grid with a row or column per value of each source field, and an editor for the target value in each cell. **Script** holds the script. **Data** holds the matrix as JSON.

## Rule set types

<!-- source: platform/data/AvailableValue?Table=MatrixRuleSet&Field=Type -->

| Type | Key | What it does |
| --- | --- | --- |
| Matrix | `matrix` | Looks up the target value in the grid, by the values of the source fields. |
| Mapping | `mapping` | Not implemented. The value is inactive, so you cannot choose it. |
| Script | `script` | Runs the script in the browser and sets the target field to what it returns. The script receives `current`, the record on the form. |

## Shipped rule set

Servicely ships one rule set. It derives incident priority from impact and urgency. On requests, changes and problems, priority is set by hand.

<!-- source: platform/data/MatrixRuleSet -->

| Name | Type | Table | Source fields | Target field | On change | On load | Read only |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Update Priority | Matrix | Incident | Urgency, Impact | Priority | Yes | No | No |

Its matrix gives these priorities:

<!-- source: platform/data/MatrixRuleSet?Name=Update Priority -->

| Impact | Urgency High | Urgency Medium | Urgency Low |
| --- | --- | --- | --- |
| High | P1 \| Critical | P2 \| High | P3 \| Medium |
| Medium | P2 \| High | P3 \| Medium | P4 \| Low |
| Low | P3 \| Medium | P4 \| Low | P5 \| Planning |

The rule set's **Read only** is off. An incident UI event makes Priority read only on the incident form instead. To change how incident priority is derived, edit the cells of this matrix rather than the Priority choices.

## Related

- [Choices and available values](page:data-model/choices)
- [Incident and major incidents](page:itsm/incident)
- [UI events](page:automation/scripts/ui-events)
- [Make a choice field depend on another field](page:data-model/dependent-choice-fields)
