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

# Saved Views

> Saved views are predefined column visibility presets that allow users to switch between different column sets within a Nextedy RISKSHEET document.

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

Views are the primary mechanism for supporting **staged risk assessment workflows** — exposing only the column subset relevant to each phase of the analysis. A typical risk assessment progresses through five stages: identification (capturing failure modes or hazards), classification (rating severity, occurrence, detection), mitigation (assigning corrective actions), residual assessment (re-rating after mitigation), and final review (verifying status and approvals). Each stage benefits from a focused view that hides columns belonging to the other stages, reducing visual noise and guiding the analyst through the workflow.

## Configuration Property

| Property | Type  | Default | Description                                                                        |
| -------- | ----- | ------- | ---------------------------------------------------------------------------------- |
| `views`  | array | `[]`    | Array of view definition objects, each specifying a named column visibility preset |

Each view object in the array defines which columns are visible when that view is selected.

## View Object Properties

| Property      | Type    | Default  | Description                                                                                                                       |
| ------------- | ------- | -------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `name`        | string  | Required | Display name shown in the view selector dropdown                                                                                  |
| `columnIds`   | array   | Required | Array of column IDs that are visible when this view is active. Supports the `@all` shorthand and the `-columnId` exclusion prefix |
| `defaultView` | boolean | `false`  | When `true`, marks this view as the one loaded by default (v24.1.0+). Only one view should have `defaultView: true`               |

### Special `columnIds` Values

The `columnIds` array supports two special tokens in addition to literal column IDs:

| Token       | Meaning                                                                                                               |
| ----------- | --------------------------------------------------------------------------------------------------------------------- |
| `@all`      | Includes ALL columns defined in the top-level `columns` section                                                       |
| `-columnId` | Excludes the named column. Typically used together with `@all` to start from the full set and remove specific columns |

## Location in Configuration

The `views` property is a top-level array within the sheet configuration:

```yaml theme={null}
columns:
  - id: col1
    header: Column 1
dataTypes:
  risk:
    type: failureMode
views:
  - name: View Name
    defaultView: true
    columnIds:
      - col1
      - col2
      - col3
```

## Behavior

### View Switching

When a user selects a saved view from the view selector in the Risksheet toolbar, the grid immediately updates to show only the columns listed in that view's `columnIds` array. All other columns are hidden. The data itself is unchanged — only column visibility is affected.

### Default State

When the sheet first loads, the view marked with `defaultView: true` is applied. If no view has `defaultView: true`, all columns defined in the top-level `columns` array are visible. Selecting a view narrows visibility to the specified subset.

### Column ID Matching

The `columnIds` array in a view must contain valid column `id` values that match columns defined in the top-level `columns` configuration. If a view references a column ID that does not exist, that entry is silently ignored.

<Frame>
  <img src="https://mintcdn.com/none-17b4493f/yWl5nA2D0IzEnZC1/risksheet/diagrams/reference/saved-views/diagram-1.svg?fit=max&auto=format&n=yWl5nA2D0IzEnZC1&q=85&s=57bc46fc11d4fad138eec8706ba62448" alt="diagram" style={{ maxWidth: "680px", width: "100%" }} width="680" height="160" data-path="risksheet/diagrams/reference/saved-views/diagram-1.svg" />
</Frame>

## Staged Risk Assessment with Views

A complete risk assessment workflow typically moves through these stages, each supported by a dedicated view that exposes the relevant column subset:

| Stage                  | Purpose                                                         | Typical Columns Exposed                                                                |
| ---------------------- | --------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| 1. Identification      | Capture failure modes, hazards, or threats                      | ID, function/item, failure mode, cause, effect                                         |
| 2. Classification      | Rate severity, occurrence, detection (or equivalent parameters) | ID, failure mode, severity, occurrence, detection, calculated score (RPN/ASIL)         |
| 3. Mitigation          | Assign corrective actions and owners                            | ID, failure mode, calculated score, mitigation, responsible person, due date           |
| 4. Residual Assessment | Re-rate the risk after mitigation is applied                    | ID, failure mode, original score, revised severity/occurrence/detection, revised score |
| 5. Final Review        | Verify status, review state, and approvals                      | ID, failure mode, original score, revised score, work item status, review status       |

By exposing only the columns relevant to each stage, views act as workflow guides — analysts working on classification do not see mitigation columns, reviewers do not see the detailed failure analysis grid, and so on. Combined with role-based default views, this turns a single Risksheet document into a stage-aware analysis tool.

## Persistence Behavior

<Warning title="Views Are Not User-Specific">
  Saved views are defined by administrators in the sheet configuration and apply to all users of the document. Individual users cannot create, modify, or delete saved views through the UI. Saved views are shared presets, not personal configurations.
</Warning>

| Feature                                    | Persistence                                                 |
| ------------------------------------------ | ----------------------------------------------------------- |
| Saved view definitions                     | Stored in the sheet configuration, persists across sessions |
| Currently selected view                    | Resets on page reload (unless overridden by `defaultView`)  |
| Column group collapse state (`collapseTo`) | Not persisted across page reloads                           |
| "Select visible columns" user selections   | Persisted on the user's computer (browser storage)          |

<Note title="Select Visible Columns vs. Saved Views">
  The "Select visible columns" feature provides a separate mechanism for users to hide or show individual columns. This selection persists on the user's computer through browser local storage. However, switching to a saved view overrides the user's column visibility selections. The two mechanisms operate independently but saved views take precedence when activated.
</Note>

## Complete Example

An FMEA configuration with views aligned to the staged assessment workflow:

```yaml theme={null}
columns:
  - id: systemItemId
    header: ID
    bindings: systemItemId
    type: string
  - id: title
    header: Title
    bindings: title
    type: string
  - id: function
    header: Function
    bindings: linkedItem
    type: itemLink
  - id: failureMode
    header: Failure Mode
    bindings: title
    type: string
    level: 2
  - id: effect
    header: Effect
    bindings: customField1
    type: string
  - id: cause
    header: Cause
    bindings: customField2
    type: string
  - id: sev
    header: S
    bindings: severity
    type: rating:severity
  - id: occ
    header: O
    bindings: occurrence
    type: rating:occurrence
  - id: det
    header: D
    bindings: detection
    type: rating:detection
  - id: rpn
    header: RPN
    bindings: rpn
    type: int
    formula: commonRpn
  - id: mitigation
    header: Mitigation
    bindings: linkedTask
    type: taskLink
  - id: responsible
    header: Responsible
    bindings: assignee
    type: ref:user
  - id: dueDate
    header: Due Date
    bindings: dueDate
    type: date
  - id: sevNew
    header: S (new)
    bindings: severityNew
    type: rating:severity
  - id: occNew
    header: O (new)
    bindings: occurrenceNew
    type: rating:occurrence
  - id: detNew
    header: D (new)
    bindings: detectionNew
    type: rating:detection
  - id: rpnNew
    header: RPN (new)
    bindings: rpnNew
    type: int
    formula: commonRpnNew
  - id: status
    header: Status
    bindings: status
    type: enum:status
  - id: reviewStatus
    header: Review
    bindings: reviewsRendered
    type: string
views:
  - name: Full Analysis
    defaultView: true
    columnIds:
      - "@all"
  - name: 1 - Risk Identification
    columnIds:
      - systemItemId
      - title
      - function
      - failureMode
      - effect
      - cause
  - name: 2 - Risk Classification
    columnIds:
      - systemItemId
      - failureMode
      - sev
      - occ
      - det
      - rpn
  - name: 3 - Mitigation Tracking
    columnIds:
      - systemItemId
      - title
      - failureMode
      - rpn
      - mitigation
      - responsible
      - dueDate
  - name: 4 - Residual Risk
    columnIds:
      - systemItemId
      - failureMode
      - rpn
      - sevNew
      - occNew
      - detNew
      - rpnNew
  - name: 5 - Final Review
    columnIds:
      - systemItemId
      - title
      - failureMode
      - rpn
      - rpnNew
      - status
      - reviewStatus
      - responsible
  - name: All Except Mitigation Detail
    columnIds:
      - "@all"
      - "-mitigation"
      - "-responsible"
      - "-dueDate"
formulas:
  commonRpn: "function(info){ var value = info.item['occ']*info.item['det']*info.item['sev']; return value?value:null;}"
  commonRpnNew: "function(info){ var value = info.item['occNew']*info.item['detNew']*info.item['sevNew']; return value?value:null; }"
```

### View Descriptions

**Full Analysis** — Uses the `@all` shorthand to include every column defined in the top-level `columns` section. Marked as `defaultView: true`, so this is what loads when the document opens.

**1 - Risk Identification** — Focused on initial risk analysis. Shows the failure mode structure (function, mode, effect, cause). Hides ratings, mitigation, and review columns so analysts can concentrate on capturing the failure scenarios.

**2 - Risk Classification** — Focused on rating the risk. Shows the failure mode identity alongside severity, occurrence, detection, and the calculated RPN. Hides mitigation and review columns so the team can debate ratings without distraction.

**3 - Mitigation Tracking** — Focused on action item management. Shows the risk identity (ID, title, failure mode) alongside the initial RPN, mitigation assignments, responsible persons, and due dates. Hides the detailed failure analysis columns.

**4 - Residual Risk** — Focused on re-rating the risk after mitigation. Shows original and revised severity/occurrence/detection and the revised RPN. Hides mitigation detail (since the assignment is done) and review columns.

**5 - Final Review** — Focused on review progress. Shows risk identity with both initial and revised RPN values, work item status, review status, and the responsible person. Hides detailed failure analysis and mitigation assignment columns.

**All Except Mitigation Detail** — Demonstrates the exclusion prefix. Starts with `@all` (every column) and then removes `mitigation`, `responsible`, and `dueDate` so reviewers see everything except action item tracking.

## Column Visibility Interaction

Saved views interact with several other column visibility mechanisms in Risksheet:

| Mechanism                 | Scope                     | Persistence           | Priority                  |
| ------------------------- | ------------------------- | --------------------- | ------------------------- |
| Saved views (`views`)     | All users, admin-defined  | Sheet configuration   | Highest when active       |
| "Select visible columns"  | Per user, user-controlled | Browser local storage | Overridden by saved views |
| Column `visible` property | All users, admin-defined  | Sheet configuration   | Base visibility           |
| Column group `collapseTo` | Per user interaction      | Not persisted         | Resets on page reload     |

When a saved view is activated, it overrides all other column visibility settings. When no saved view is selected, the base `visible` property on each column and the user's "Select visible columns" preferences determine what is shown.

## Use Cases

### Role-Based Views

Configure views that match the information needs of different team members working on the same risk document. Combine with `defaultView: true` (optionally selected dynamically by role in the top panel) so each role lands on the right view automatically:

```yaml theme={null}
views:
  - name: Safety Engineer
    columnIds:
      - systemItemId
      - title
      - failureMode
      - cause
      - effect
      - sev
      - occ
      - det
      - rpn
      - mitigation
  - name: Project Manager
    columnIds:
      - systemItemId
      - title
      - rpn
      - rpnNew
      - responsible
      - dueDate
      - status
  - name: Auditor
    defaultView: true
    columnIds:
      - "@all"
      - "-effect"
      - "-cause"
```

### Analysis Phase Views

Configure views for sequential phases of risk analysis work:

```yaml theme={null}
views:
  - name: 1 - Structure Analysis
    columnIds:
      - systemItemId
      - function
      - failureMode
      - cause
      - effect
  - name: 2 - Risk Assessment
    columnIds:
      - systemItemId
      - failureMode
      - sev
      - occ
      - det
      - rpn
  - name: 3 - Optimization
    columnIds:
      - systemItemId
      - failureMode
      - rpn
      - mitigation
      - responsible
      - dueDate
      - sevNew
      - occNew
      - detNew
      - rpnNew
```

### HARA-Specific Views

For HARA (Hazard Analysis and Risk Assessment) configurations following ISO 26262:

```yaml theme={null}
views:
  - name: Hazard Identification
    columnIds:
      - systemItemId
      - hazard
      - operatingMode
      - hazardousEvent
      - severity
      - exposure
      - controllability
  - name: ASIL Classification
    defaultView: true
    columnIds:
      - systemItemId
      - hazardousEvent
      - severity
      - exposure
      - controllability
      - asil
      - safetyGoal
```

## Limitations

* **No personal views**: Users cannot create their own saved views through the UI. All views must be defined by an administrator in the sheet configuration.
* **No filter persistence**: Saved views control only column visibility. They do not save row filter states, sort orders, or scroll positions.
* **View selection resets on reload**: The currently selected view is not remembered between page loads. Use `defaultView: true` to ensure a specific view loads on every open.
* **Exclusive column sets**: When a view is active, only the columns listed in that view (after `@all`/exclusion processing) are visible. There is no mechanism to additively show extra columns on top of a view at runtime.

<Tip title="Personal Filters Complement Saved Views">
  While saved views handle column visibility, personal filters (available since version 24.8.1) allow individual users to set row-level filters that persist between sessions. Combining saved views with personal filters gives users a consistent, customized experience for their daily workflow.
</Tip>

## Related Configuration

* [Sheet Configuration Format](/risksheet/reference/configuration/risksheet-json-format) -- Column definitions referenced by view `columnIds`
* [Configuration Properties Index](/risksheet/reference/configuration/properties-index) -- Global settings that affect the view selector display
* [Column Type Reference](/risksheet/reference/columns/column-types) -- Column type definitions
* [Create Saved Views](/risksheet/guides/customization/saved-views) -- Step-by-step guide for configuring views
* [Control Column Visibility](/risksheet/guides/columns/column-visibility) -- Alternative visibility mechanisms

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