Step 1: Define Enum Options with Descriptions
Add your enumeration definitions to theenums section of risksheet.json. Each option includes an id and name, with an optional description that provides additional context in the dropdown:
| Enum Property | Required | Purpose |
|---|---|---|
id | Yes | Value stored when the option is selected (used internally) |
name | Yes | Display label shown as the primary text in the dropdown |
description | No | Secondary text shown below the option name for context |
visible | No | Controls whether the option appears in the dropdown (default: visible) |
Step 2: Configure Rating Enumerations
For risk assessment scales (severity, occurrence, detection), use theratings section instead of enums. The structure is identical, but ratings are semantically distinct and are used by the risk parameter system:
enums and ratings are loaded into the configuration as registries of option arrays. Columns reference them using the type property with the format enum:<id> or rating:<id>.
Step 3: Bind Columns to Enumerations
Reference your enum or rating definitions in column configurations using thetype property:
type value follows the pattern enum:<enumId> or rating:<enumId>, where <enumId> matches the key in your enums or ratings object. The dropdown editor is automatically activated for these column types. Enum columns display option IDs internally but show user-friendly names in the grid.
Step 4: Set Up Dependent Enum Filtering
Use therelations array in risksheet.json to create cascading dropdowns where one field’s selection filters another field’s available options:
| Parent Field State | Child Dropdown Behavior |
|---|---|
| Empty (no selection) | All child options are shown |
| Has a value with defined mapping | Only mapped child options are shown |
Has a value mapped to empty array [] | No child options are available |
| Has a value not in mapping | All child options are shown |
Step 5: Configure Multi-Select Enums
For columns that allow selecting multiple values, usemultiEnum:<enumId> as the column type. Multi-select dropdowns display up to 2 selected items in the collapsed cell before showing a count indicator (for example, “+3 more”):
relations configuration: when a controlling field changes, the multi-select dropdown automatically filters its available options.
The dropdown has fixed maximum dimensions (400px width, 380px height). For enums with many options or long descriptions, verify that your content displays correctly within these constraints. If descriptions are truncated, consider shortening them.
Step 6: Control Option Visibility
Each enum option supports avisible property that controls whether the option appears in the dropdown. Set visible: false to hide deprecated or retired options while preserving them for historical data:
Verification
You should now see dropdown fields in your Risksheet columns showing the configured enum options with descriptions. Selecting a value in a parent enum field should automatically filter the available options in dependent child fields. Multi-enum columns should display multiple selections as a compact list with a count indicator when more than 2 items are selected.See Also
- Configure Enum Columns — detailed enum column setup
- Configure Multi-Enum Columns — multi-select enumeration columns
- Configure Dependent Enums — advanced cascading dropdown patterns
- Configure Multi-Select Enums — multi-select behavior and display
- Add a Basic Column — column type configuration basics
Sources
Sources
KB ArticlesSource Code
EnumComboBox.tsMultiEnumEditor.tsRiskSheetContextMenu.tsAppConfigParser.ts