> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nextedy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure Dependent Enums

> Set up cascading enumeration relationships so that selecting a value in one column automatically filters the available options in another column.

export const LastReviewed = ({date}) => {
  if (!date) return null;
  const formatted = new Date(`${date}T00:00:00Z`).toLocaleDateString("en-US", {
    year: "numeric",
    month: "long",
    day: "numeric",
    timeZone: "UTC"
  });
  return <p className="mt-10 text-sm text-gray-400 dark:text-zinc-500 not-prose">
      Last reviewed on {formatted}
    </p>;
};

## Prerequisites

* Nextedy RISKSHEET version 25.3.1 or later (single-value enums) or 25.4.0 or later (multi-value enums)
* Parent and child enumerations already defined in Polarion (**Administration > Enumerations**)
* Custom fields on your risk work item type that bind to those enumerations
* Administrator access to edit the sheet configuration

<Steps>
  <Step title="Define the Enumerations in Polarion">
    Dependent enums reference enumerations that already exist in Polarion. Enums are **not** defined inside the sheet configuration.

    1. In Polarion, go to **Administration > Enumerations**.
    2. Create or open the parent enumeration (for example, `risk-category`).
    3. Add the parent values (for example, `hardware`, `software`, `mechanical`).
    4. Create the child enumeration (for example, `risk-type`).
    5. Add all possible child values (for example, `esd`, `shortCircuit`, `memoryLeak`, `deadlock`, `fatigue`, `wear`).
    6. Bind both enumerations to custom fields on your risk work item type.

    The sheet configuration references these enumeration IDs but does not contain the values themselves. The server loads the values automatically when the column is rendered.
  </Step>

  <Step title="Define Columns for Both Enums">
    In the sheet configuration, add the parent and child columns to the `columns` array. Use `type: enum:<enumId>` to reference the Polarion enumeration ID, and `bindings` (plural) to map the column to its Polarion custom field:

    ```yaml theme={null}
    columns:
      - id: riskCategory
        header: Risk Category
        bindings: riskCategory
        type: enum:risk-category
      - id: riskType
        header: Risk Type
        bindings: riskType
        type: enum:risk-type
    ```
  </Step>

  <Step title="Configure the Dependent Enum Mapping">
    The dependent enum mapping is declared on the **child column** through its `typeProperties`. It identifies the parent column and lists which child enum values are valid for each parent value:

    ```yaml theme={null}
    columns:
      - id: riskType
        header: Risk Type
        bindings: riskType
        type: enum:risk-type
        typeProperties:
          dependsOn: riskCategory
          mapping:
            hardware:
              - esd
              - shortCircuit
            software:
              - memoryLeak
              - deadlock
            mechanical:
              - fatigue
              - wear
    ```

    With this configuration, selecting **Hardware** in the Risk Category column filters the Risk Type dropdown to show only **ESD Failure** and **Short Circuit**.
  </Step>
</Steps>

## How the Cascading Behavior Works

* When the parent field value changes, Risksheet automatically updates the child dropdown options.
* If the parent field is empty or has no mapping entry, all child options are shown.
* If the parent value maps to an empty array, no child options are shown.
* Cascading changes are tracked in the undo stack — you can revert the entire chain with a single undo.

<Warning title="Same Row Scope Only">
  Dependent enum mappings only apply between two columns bound to the same risk item row. Cross-level relationships (for example, a risk-level field driving a task-level field) are not supported and are ignored at runtime.
</Warning>

<Steps>
  <Step title="Configure Multi-Enum Dependencies (Optional)">
    For multi-select enum columns, use the `multiEnum:` type prefix instead of `enum:`. The `typeProperties.mapping` works the same way:

    ```yaml theme={null}
    columns:
      - id: riskType
        header: Risk Type
        bindings: riskType
        type: multiEnum:risk-type
        typeProperties:
          dependsOn: riskCategory
          mapping:
            hardware:
              - esd
              - shortCircuit
    ```

    When a parent value is deselected, any child multi-enum values that depended on that parent are automatically removed. This prevents invalid data combinations.

    <Tip title="Bidirectional Propagation">
      Risksheet supports both forward (parent to child) and backward (child to parent) updates. If a child value requires a specific parent value and only one valid parent exists, the parent is auto-populated.
    </Tip>
  </Step>

  <Step title="Bulk Editing with Dependent Enums">
    When you select multiple rows and edit a parent enum field, all dependent child fields across all selected rows update automatically according to the configured mapping rules.
  </Step>
</Steps>

## Verification

Open the risksheet document and confirm that selecting a value in the parent column filters the child column dropdown to show only the mapped options. Changing the parent value should automatically clear or update the child value if the current selection is no longer valid.

## See Also

* [Configure Enum Columns](/risksheet/guides/columns/enum-columns)
* [Configure Multi-Enum Columns](/risksheet/guides/columns/multi-enum-columns)
* [Configure Multi-Select Enums](/risksheet/guides/advanced/enum-multiselect)
* [Use Undo and Redo](/risksheet/guides/advanced/undo-redo)

<LastReviewed date="2026-06-18" />
