Prerequisites
- A working data model with at least one entity type
- A sheet configuration displaying entity properties
- Access to the project SVN repository to edit YAML configuration files
Choose Your Approach
Powersheet supports two mechanisms for computed properties, each suited to different use cases:Option A: Server-Rendered Property (Velocity)
Use this approach when you need to compute a value on the server using Polarion platform services and work item data.Step 1: Add the Property to Your Data Model
Open your data model YAML file and add a property with aserverRender pattern to the target entity type. The value is a Velocity template expression that the server evaluates for each work item:
serverRender value is a standard Velocity template string. The server evaluates it in a context that includes the current work item and Polarion platform services.
Step 2: Use Context Variables in Your Template
Server-rendered properties have access to these context variables during evaluation:
In addition, the Polarion platform services (
$trackerService, $txService, $repositoryService, $securityService) are automatically injected and cached for performance. For the full list and what each service is for, see Platform Services in the Velocity Templates reference.
Example — concatenate ID and title with a status badge:
$wi (the low-level work item API, for methods not available on $item):
Step 3: Mark the Property as Read-Only
Server-rendered properties are automatically treated as non-editable by the rendering mechanism. You should explicitly setreadable: true and updatable: false in your property definition to make the intent clear:
Step 4: Display the Property in Your Sheet
Add a column in your sheet configuration that binds to the computed property:Step 5: Use Custom Field Data in Templates
customFieldName maps a data-model property to a Polarion custom field by its field ID, so the property reads and writes that custom field’s value. Once mapped, you can reference the property within a Velocity template:
Step 6: Alias Field Names with serverName
serverName aliases a property to a different underlying Polarion field ID: the property keeps its client-facing name in the sheet while reading and writing the field named by serverName on the server. Use it when the Polarion field name differs from the name you want to expose:
Option B: Dynamic Value Expression (JavaScript)
Use this approach for client-side calculations in your sheet configuration. Dynamic value expressions use JavaScript arrow function syntax and are evaluated in the browser.Step 1: Add a Formula Column
To compute a value from other properties on the current item, use theformula property in your column definition:
Formula writes back to the data source
Formula writes back to the data source
The
formula property calculates a value and saves it back to the underlying field. If you only need to change how a value is displayed without modifying data, use render instead.Step 2: Understand Context Availability
Not all context properties are available in every location. The available properties depend on where the expression is used. In the table below, ✅ means the property is available at that location and-- means it is not available:
Step 3: Use Dynamic Expressions in Different Locations
Filter a query by current document:Step 4: Add Conditional Formatting
Formatter expressions use a simplified syntax without the() => prefix. The expression is evaluated as a boolean condition directly:
Unlike other dynamic expressions, formatter
expression values do not use the () => prefix. They are evaluated as direct boolean conditions.Debugging Computed Properties
Server-Rendered Properties
If a server-rendered property returns#SERVER_RENDER_ERROR, the Velocity template failed to evaluate. Common causes:
Column renders the literal template text, or does not appear at all
A computed column that shows the raw template (e.g.$item.id - $item.title) verbatim instead of the evaluated value — or that does not appear in the sheet at all — usually points to one of the following. Work through them in order:
- Install-time cache not cleared. This is the most common cause. The
serverRenderannotation is only picked up after the install-time caches are cleared and the server is restarted. Confirm that both[POLARION_DATA]/workspace/.configand[POLARION_DATA]/workspace/.metadatawere deleted and Polarion was fully restarted — a stale.metadatacache in particular lets the plugin load while server-side rendering silently fails to engage. See Installing Powersheet, Step 1 for the exact procedure. polarionTypemismatch. Confirm the entity’spolarionTypematches the real Polarion work-item type ID exactly — the match is case-sensitive. If it does not match a real type, the property is never bound to live work items and nothing is rendered.- Document caches its column layout. An existing Powersheet document caches the columns it was opened with, so a newly added column may not appear until you fully close and re-open (or reload) the document — the in-sheet refresh action alone is not always enough.
These are diagnostic steps for the most frequent causes. If a column still renders its literal template after working through all three, capture the server logs and the exact property and column YAML, then contact Nextedy support.
Dynamic Value Expressions
Client-side expressions fail silently if the context property is not available. Verify:- You are using the
() =>prefix (not$context, which is for model constraints only) - The context property is available at the location where you are using it (see the availability table above)
- Property names match your data model exactly (case-sensitive)
Verification
After saving your YAML configuration and reloading the sheet:- Server-rendered property: You should now see the computed value in the column. Edit the underlying work item fields and reload — the computed value updates to reflect the changes
- Dynamic formula: You should now see the calculated value appear. If using
formula, verify the value is persisted by checking the work item in Polarion - Render/display: You should now see formatted output in the cell without any data modification
#SERVER_RENDER_ERROR in a column, refer to Debug Template Errors for troubleshooting steps.
See Also
- Use Velocity Templates — write and test Velocity template expressions for server rendering
- Access Polarion Services — use platform services like
$trackerServicein your templates - Debug Template Errors — diagnose and fix server rendering failures
- Configure Dynamic Expressions — full guide to
() =>expressions in sheet configuration - Add a Custom Property — add standard (non-computed) properties to entity types
- Configure a Formatter — apply conditional styling with formatter expressions