> ## 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.

# Consolidate Multiple Link Columns

> Combine multiple separate link columns into a single `multiItemLink` column that displays all linked work item types together, reducing grid width and providing a unified traceability view.

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>;
};

## When to Consolidate

You might have separate columns for each linked item type — for example, one column for system test cases, another for software test cases, and a third for integration test cases. When most rows link to items of mixed types, presenting them in one consolidated column keeps the grid narrow and surfaces all related work items in a single place.

Use consolidation when:

* Several `itemLink` columns share the same link role and only differ in the target work item type.
* Reviewers and analysts care about "everything linked here" more than the type breakdown.
* You still want a per-type breakdown available on demand through a saved view.

<Steps>
  <Step title="Define All Types on the Link Column">
    Configure the consolidated column to include all work item types you want to display. The `typeProperties` block sits directly on the link column (the column whose `type` is `itemLink` or `multiItemLink`) and has six sub-properties — use `linkTypes` (comma-separated string) and `linkRole` (single role name) to define which links the column resolves:

    ```yaml theme={null}
    columns:
      - id: allTestCases
        bindings: linkedItems.title
        header: Test Cases
        type: multiItemLink
        typeProperties:
          linkRole: verifies
          linkTypes: systemTestCase,softwareTestCase,integrationTestCase
    ```

    ### typeProperties Sub-Properties

    The `typeProperties` block supports these sub-properties:

    | Sub-property    | Type    | Description                                                                   |
    | --------------- | ------- | ----------------------------------------------------------------------------- |
    | `linkRole`      | string  | Link role name connecting the row work item to the linked item.               |
    | `linkTypes`     | string  | Comma-separated list of Polarion work item type IDs allowed in the column.    |
    | `linkDirection` | string  | Use `back` to traverse the link in reverse direction.                         |
    | `backLink`      | boolean | Render the column as a back-link (reverse-direction display).                 |
    | `itemTemplate`  | string  | Velocity template for custom item rendering inside the cell.                  |
    | `queryFactory`  | string  | Name of a `queryFactories` entry used to filter the autocomplete suggestions. |

    Note that `linkTypes` is a **single comma-separated string**, not an array, and `linkRole` is the correct property name (not `role`). Older drafts of this page used `type` and `role` inside `typeProperties` — those names are incorrect.
  </Step>

  <Step title="Use multiItemLink Column Type">
    Replace your separate `itemLink` columns with a single `multiItemLink` column. The column's `bindings` property specifies the linked-item field to display, using dot notation (for example, `linkedItems.title`):

    ```yaml theme={null}
    columns:
      - id: allTestCases
        bindings: linkedItems.title
        header: Test Cases
        type: multiItemLink
        width: 250
    ```

    <Warning title="Use multiItemLink, Not itemLink">
      The `itemLink` type displays only one linked item per cell. If multiple items are linked, additional links are silently dropped. Always use `multiItemLink` when consolidating multiple link types into one column.
    </Warning>
  </Step>

  <Step title="Configure Saved Views">
    Use saved views to switch between the consolidated view and individual columns. Define a view that shows only the consolidated column and another that lists per-type columns. The view property is `columnIds` (not `columns`):

    ```yaml theme={null}
    views:
      - name: Consolidated
        defaultView: true
        columnIds:
          - riskId
          - riskTitle
          - allTestCases
          - rpn
      - name: By Test Type
        columnIds:
          - riskId
          - riskTitle
          - systemTests
          - softwareTests
          - integrationTests
          - rpn
    ```

    You can also use `"@all"` to include every column, and prefix a column ID with `-` to exclude it from the `@all` set (for example, `- "-rpn"` to hide RPN).

    <Tip title="Better Overview with Saved Views">
      Consolidating link columns into one general column combined with saved views provides a better overview for day-to-day use, while keeping the detailed per-type view available when needed.
    </Tip>
  </Step>

  <Step title="Control Item Creation Target">
    When using a consolidated column, specify where newly created items should be stored. The column's `typeProperties` can include `document` for scoping to an upstream library, while the data type entry carries `project`, `projects`, or `createInDocument` for new item targets:

    ```yaml theme={null}
    dataTypes:
      task:
        type: systemTestCase
        role: verifies
        createInDocument: Testing/Test Specification

    columns:
      - id: allTestCases
        bindings: linkedItems.title
        header: Test Cases
        type: multiItemLink
        typeProperties:
          linkRole: verifies
          linkTypes: systemTestCase,softwareTestCase
          itemTemplate: testCaseTemplate
    ```

    When `createInDocument` (v24.8.1+) is set, newly created items from the consolidated column are stored in the specified document. To restrict autocomplete suggestions to a shared library, set `typeProperties.document` on the column to the library path (for example, `02 - Risk Management File/Harms Library`).
  </Step>

  <Step title="Prevent Creation if Needed">
    If the consolidated column should only display existing links without allowing new item creation, set `canCreate: false` on the column:

    ```yaml theme={null}
    columns:
      - id: allTestCases
        bindings: linkedItems.title
        header: Test Cases
        type: multiItemLink
        canCreate: false
        width: 250
    ```

    You can also disable creation globally for the data type by setting `canCreate: false` on `dataTypes.task` — that disables creation across every link column bound to this data type.

    <Warning title="Column IDs in Levels and SortBy">
      If you reference link column IDs in `levels` or `sortBy` configuration, ensure the IDs exactly match the column definitions. Mismatched IDs cause row duplication in the grid.
    </Warning>
  </Step>

  <Step title="Refine Autocomplete with a queryFactory">
    For long item lists, point `typeProperties.queryFactory` to a named function in the `queryFactories` section. The function returns a Lucene query string that further narrows the autocomplete suggestions — for example, restricting suggestions to the current document:

    ```yaml theme={null}
    queryFactories:
      scopedTestCases: "function(info){ return 'document.id:' + info.documentId; }"
    ```

    Reference it from the column's `typeProperties`:

    ```yaml theme={null}
    columns:
      - id: allTestCases
        bindings: linkedItems.title
        header: Test Cases
        type: multiItemLink
        typeProperties:
          linkRole: verifies
          linkTypes: systemTestCase,softwareTestCase
          queryFactory: scopedTestCases
    ```
  </Step>
</Steps>

## Verification

Save the sheet configuration and reload your risksheet. You should now see the single consolidated column displaying all linked items from the different work item types. Each item appears as a separate entry in the cell. Switch between saved views to confirm both the consolidated and individual column views work correctly. If a linked item type is missing from suggestions, double-check that its work item type ID is present in the comma-separated `linkTypes` string.

## See Also

* [Show Multiple Linked Items](/risksheet/guides/columns/multiple-linked-items) — multiItemLink column basics
* [Create Saved Views](/risksheet/guides/customization/saved-views) — configure view switching
* [Control Column Visibility](/risksheet/guides/columns/column-visibility) — show and hide columns
* [Configure Upstream Traceability Columns](/risksheet/guides/columns/upstream-traceability) — upstream link setup
* [Configure Downstream Traceability Columns](/risksheet/guides/columns/downstream-traceability) — downstream link setup

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