Skip to main content

Step 1: Define Views in Configuration

Open your risksheet.json and add a views array. Each view specifies a name and the list of column IDs to display:
{
  "views": [
    {
      "name": "Full Analysis",
      "columns": ["systemItemId", "title", "sev", "occ", "det", "rpn", "taskId", "taskTitle"]
    },
    {
      "name": "Risk Overview",
      "columns": ["systemItemId", "title", "sev", "rpn"]
    },
    {
      "name": "Mitigation Focus",
      "columns": ["systemItemId", "title", "taskId", "taskTitle", "taskStatus"]
    }
  ]
}
Each entry in the views array requires:
PropertyTypeDescription
namestringDisplay label shown in the view selector dropdown
columnsarrayList of column id values to make visible when this view is active

Step 2: Assign Column IDs

Ensure every column in your columns configuration has an explicit id that matches the values in your view definitions. If you omit id, the system auto-generates one from the header or binding, which may not match your view references.
{
  "columns": [
    { "id": "sev", "binding": "severity", "header": "S", "type": "enum:severity" },
    { "id": "occ", "binding": "occurrence", "header": "O", "type": "enum:occurrence" },
    { "id": "det", "binding": "detection", "header": "D", "type": "enum:detection" },
    { "id": "rpn", "binding": "rpn", "header": "RPN", "formula": "commonRpn" }
  ]
}

Step 3: Select a View at Runtime

After loading the Risksheet, use the view selector in the toolbar to switch between your defined views. The grid immediately updates to show only the columns listed in the selected view. diagram
The collapseTo column group state resets on every page reload. If users need consistent column visibility without manual re-collapsing, use saved views instead of relying on column group collapsing.
Define a dedicated view for PDF or Excel exports that hides formula helper columns. Switch to the export view before exporting, then switch back. Do not set the export view as the default, because formulas only execute when their column is visible on sheet load.

Step 4: Combine with Personal Column Visibility

Users can further refine which columns appear using the Select visible columns feature, which persists on the user’s local machine. However, switching saved views resets any personal column visibility selections.
Saved views are configured in risksheet.json by administrators. Individual users cannot create personal saved views through the UI. The Select visible columns feature provides per-user customization that persists locally but resets when a different saved view is selected.

Verification

You should now see a view selector dropdown in the Risksheet toolbar listing each view by its name. Selecting a view immediately toggles column visibility to match the defined columns list. Columns not listed in the active view are hidden from the grid.

See Also

KB ArticlesSupport TicketsSource Code
  • AppConfig.ts
  • CommandFactory.ts