Skip to main content

When to Use This

You may have separate columns for different upstream or downstream link types (e.g., System Requirements, Software Requirements, Hazards) and want to display all links together in one column. This approach reduces horizontal scrolling and presents a unified view of all related items.

Configuration Steps

1. Define the Consolidation Formula

Add a formula to your risksheet.json that concatenates the link values from each source column. The formula checks each link column and combines non-empty values with line breaks:
"formulas": {
  "consolidated_links": "(info) => {
    return (info.item.sysreq_link ? info.item.sysreq_link + '<br>' : '') + 
           (info.item.swreq_link ? info.item.swreq_link + '<br>' : '') + 
           (info.item.hazard_link ? info.item.hazard_link || '' : '');
  }"
}
Replace sysreq, swreq, and hazard with your actual column IDs.

2. Configure the Cell Decorator

Add a cell decorator to render the HTML properly (otherwise links appear as raw HTML text):
"cellDecorators": {
  "consolidated_links": "(info) => {
    info.cell.innerHTML = info.cell.innerText;
  }"
}

3. Add the Consolidated Column

Define the column that will display the combined links:
{
  "headerGroup": "Traceability",
  "headerGroupCss": "headTraceability",
  "headerCss": "headTraceability",
  "header": "All Items",
  "width": 200,
  "serverRender": "<b>placeholder</b>",
  "formula": "consolidated_links",
  "id": "consolidated_links",
  "cellRenderer": "consolidated_links",
  "filterable": true,
  "level": 1
}
The source link columns (sysreq, swreq, hazard) must appear before the consolidated column in your column array. Formulas cannot reference columns that are defined later in the configuration.
Use different HTML separators in your formula for varied layouts:
  • '<br>' creates vertical stacking (recommended)
  • ', ' creates comma-separated inline text
  • ' | ' creates pipe-delimited inline text

How It Works

ColumnTypeExample Value
Sys Req (source)itemLinkSYS-001
SW Req (source)itemLinkSW-045, SW-046
Hazard (source)itemLinkHAZ-12
Result (calculated)formulaSYS-001, SW-045, SW-046, HAZ-12
The formula iterates through each source column’s link value, filters out empty values, and concatenates them with HTML line breaks.

Common Pitfalls

If a source column ID referenced in your formula doesn’t exist, the entire formula fails silently. Verify all column IDs are spelled correctly and exist in your configuration.
This technique works with standard itemLink columns. For multiItemLink columns (showing multiple items per cell), you’ll need a more complex formula that parses the JSON array format.
Consolidated columns are calculated (formula-based), so they are always read-only. Users must edit the source link columns to change values.

Verification

After saving your configuration and refreshing the Risksheet:
  1. The consolidated column displays all link IDs from source columns
  2. Each link appears on a separate line
  3. Links are clickable and navigate to the referenced work items
  4. Empty source columns are skipped (no blank lines appear)

See Also

KB ArticlesSupport TicketsSource Code
  • CustomMergeManager.ts
  • GridUndoStack.ts
  • SheetConstants.ts
  • CellEditorFormatter.ts
  • ExportToExcel.ts