Calculated columns use the standard column properties plus the formula property that references a named formula definition.
Property
Type
Default
Description
id
string
Auto-generated from header or binding
Unique identifier for the column. Used as the data binding name.
header
string
Required
Display text shown in the column header
formula
string
None
Name of a formula defined in the top-level formulas object. When set, the column becomes read-only automatically.
width
number
See application
Column width in pixels
minWidth
number
See application
Minimum width in pixels the column can be resized to
readOnly
boolean
true (auto)
Automatically set to true when formula is specified. Cannot be overridden to false for formula columns.
type
string
Auto-detected
Data type for the column. For calculated columns producing numeric results, typically inferred automatically.
level
number
1
Hierarchical level at which this column appears (1 = top level, 2 = second level). Not set for task columns.
headerGroup
string
See application
Name of the header group this column belongs to for multi-level headers
collapseTo
string
See application
Column ID to collapse this column into when the header group is collapsed
cellCss
string
See application
CSS class name(s) to apply to cells in this column
headerGroupCss
string
See application
CSS class name(s) to apply to the header group row
filterable
boolean
true
Controls whether users can filter the grid by values in this column
format
string
See application
Display format string for the column data (e.g., number format)
multiLine
boolean
true
Enables multi-line text display within cells
wordWrap
boolean
true
Controls whether text wraps within cells
isContentHtml
boolean
See application
Indicates that cell content should be rendered as HTML
cellRenderer
string
See application
Name of a custom cell renderer function for this column
When a column has a formula property set, the column is automatically marked as read-only. This is enforced by the configuration manager and cannot be overridden. Users see computed values but cannot edit cells in formula columns.
Formulas are defined in the top-level formulas object of risksheet.json. Each formula is a named JavaScript function that receives an info context object and returns the computed value.
Property
Type
Default
Description
formulas
object
{}
Collection of named JavaScript functions for calculating derived values in cells. Each key is a formula name, and the value is the JavaScript function body as a string.
The two most common formulas in FMEA risk analysis are the initial RPN and the revised (post-mitigation) RPN:Initial RPN (commonRpn):
{ "formulas": { "commonRpn": "function(info){ var value = info.item['occ']*info.item['det']*info.item['sev']; return value?value:null;}" }}
Input Field
Description
Typical Range
info.item['occ']
Occurrence rating
1-10
info.item['det']
Detection rating
1-10
info.item['sev']
Severity rating
1-10
Revised RPN (commonRpnNew):
{ "formulas": { "commonRpnNew": "function(info){ var value = info.item['occNew']*info.item['detNew']*info.item['sevNew']; return value?value:null; }" }}
Input Field
Description
Typical Range
info.item['occNew']
Revised occurrence rating (after mitigations)
1-10
info.item['detNew']
Revised detection rating (after mitigations)
1-10
info.item['sevNew']
Revised severity rating (after mitigations)
1-10
Both RPN formulas return null when the computed value is 0 (falsy). This prevents displaying 0 in the grid when input fields have not been filled in yet. The return value?value:null pattern is the standard approach for null-safe formula results.
Risk calculations can reference properties from different work item types in the hierarchy. For example, you can configure a formula to use the severity from the Risk item itself rather than from a linked Accident or Harm work item. The formula accesses the field through info.item['fieldId'] regardless of which work item type provides the value — the data binding resolves the correct source.
The exact behavior of cross-type field references depends on your data type configuration and level hierarchy. The severity source can be changed by modifying which field ID the formula references. Consult your dataTypes configuration to understand which fields are available on each work item type.
Calculated columns are frequently paired with cell decorators to apply conditional formatting based on the computed value. The cell decorator function references the formula column’s output value.
{ "formulas": { "commonRpn": "function(info){ var value = info.item['occ']*info.item['det']*info.item['sev']; return value?value:null;}" }, "cellDecorators": { "rpn": "function(info){ var val = info.value; $(info.cell).toggleClass('boldCol', true); $(info.cell).toggleClass('rpn1', val>0 && val <= 150); $(info.cell).toggleClass('rpn2', val > 150 && val <= 350); $(info.cell).toggleClass('rpn3', val > 350);}" }, "styles": { ".boldCol": "font-weight:600;", ".rpn1": "background-color: #eaf5e9 !important;color: #1d5f20 !important;", ".rpn2": "background-color: #fff3d2 !important; color: #735602 !important;", ".rpn3": "background-color: #f8eae7 !important;color: #ab1c00 !important;" }}
The decorator applies CSS classes based on RPN risk thresholds:
RPN Range
CSS Class
Visual Effect
1 — 150
rpn1
Green background (#eaf5e9), dark green text (#1d5f20)
151 — 350
rpn2
Yellow background (#fff3d2), dark yellow text (#735602)
Calculated column values are not automatically saved to Polarion fields when work items are imported or created outside of Risksheet. The computed values are only persisted to Polarion when:
A user edits any field in the row within Risksheet (triggering a save that includes formula results)
The data sync feature is used (introduced in version 24.5.1) to explicitly store formula column values to Polarion
If you import work items into Polarion (e.g., via CSV import or API) without editing them in Risksheet, the calculated column values will appear empty in Excel exports. This occurs because the formula values exist only in the browser during the Risksheet session but have not been written to the underlying Polarion fields.Version 24.5.1 introduced a data sync feature that ensures formula column values are stored to Polarion fields, resolving this issue for new and edited items.
The row header renderer can also reference formula column values. For example, the rowHeaderRpnNew renderer accesses info.item['rpnNew'] to color row headers based on the revised RPN:
{ "headers": { "rowHeader": { "renderer": "rowHeaderRpnNew" } }, "cellDecorators": { "rowHeaderRpnNew": "function(info){ var val = info.item['rpnNew']; $(info.cell).toggleClass('rpn1', val>0 && val <= 150); $(info.cell).toggleClass('rpn2', val>0 && val > 150 && val <= 350); $(info.cell).toggleClass('rpn3', val>0 && val > 350);}" }}
When using enum field values in row header styling, access the value using info.item['fieldId'] and compare against enum option IDs (not display names). Enum IDs are the internal identifiers defined in the ratings or enums configuration, which are typically integers for rating scales.
Dependent enum dropdowns (where child enum options filter based on a parent enum selection) are not supported in Risksheet. This means you cannot create a formula-calculated dropdown column that dynamically filters its options based on another column’s value.
Unlike regular enumerations which use string-based IDs, ratings use integer IDs. When writing formulas that reference rating values, the info.item['fieldId'] returns the integer ID of the selected rating option, which can be used directly in arithmetic calculations (e.g., multiplying severity, occurrence, and detection ratings to compute RPN).
Creating a dropdown column whose options are determined by a formula is not currently supported. Dropdown columns must reference static enums or ratings definitions in the configuration. Formula columns produce computed values only — they cannot generate dynamic option lists.
Inserting existing work items into a Risksheet via drag and drop is not supported. Work items must be created through the grid’s “New” menu or linked via item link columns. This is relevant for calculated columns because items created outside Risksheet may not have formula values persisted until they are edited within the grid.