Skip to main content

Formula Definition

Configuration Location

Formulas are defined in two places within sheet configuration:

Function Signature

Every formula function follows this pattern:

Accessing Item Properties

Use bracket notation to access work item field values:
When accessing enum fields, info.item['fieldId'] returns the enum ID (e.g., "yes"), not the display name (e.g., "Y"). Always compare against enum IDs in formula logic.

Field Access Patterns

Return Values

Always guard against null or undefined values. When multiplying risk parameters, return null for empty inputs to avoid displaying NaN or 0:

Named vs. Inline Formulas

Named Formulas

Define reusable formulas in the top-level formulas object, then reference by name in column definitions:

Inline Formulas

Define the formula directly on the column:

Formula Execution Behavior

diagram
Formula columns do not execute when hidden. If you use a formula for the title field, keep that column visible during item creation. Use Saved Views to manage column visibility for different workflows rather than hiding formula columns.

Bridging Top Panel Functions

For complex calculations, define JavaScript functions in the risksheetTopPanel.vm file and call them from sheet configuration formulas:
Document-level custom fields can be accessed via $doc.getOldApi().getValue('customFieldID') in the risksheetTopPanel.vm script section, then referenced from sheet configuration formulas through top panel functions.

Check Stored Formulas

When formula columns have readOnly: false, or when items are imported without formula execution, use Menu > Rows > Check stored formulas (available since v24.5.1) to reconcile formula values between Polarion and Risksheet.

Complete Example

Last modified on July 10, 2026