Overview
Server render columns use server-side Velocity scripts to prepare cell content before it reaches the browser. Unlike standard columns that display field values directly, server-rendered columns execute custom logic to:
Fetch linked work items and their properties
Filter items by type or other criteria
Format output as lists, tables, or custom HTML
Combine data from multiple sources
Apply conditional rendering based on item state
Columns with serverRender property are automatically converted to read-only columns. Users cannot edit server-rendered content directly from the spreadsheet. Use this column type for display purposes only.
Configuration
Basic Structure
Property Type Default Description headerstring required Display name for the column header idstring auto-generated Unique identifier for the column; used to reference the column in bindings or formulas serverRenderstring none Velocity template script that generates the cell content on the server bindingsstring $itemContext path for data access; controls which work item is treated as $item in the template widthnumber auto Column width in pixels typestring textColumn data type; typically text for server-rendered content readOnlyboolean trueAlways true for server-render columns; cannot be changed filterableboolean falseWhether users can filter this column; recommended false for complex content sortableboolean falseWhether users can sort by this column; recommended false for custom-rendered data headerGroupstring none Groups multiple columns under a single header category headerGroupCssstring none CSS class for styling the header group headerCssstring none CSS class for styling individual column header
Example Configuration
{
"header" : "Linked Requirements" ,
"id" : "linkedReqs" ,
"bindings" : "$item" ,
"type" : "text" ,
"width" : 200 ,
"headerGroup" : "Traceability" ,
"serverRender" : "<ul style='margin-block-start: -16px; margin-block-end: -16px; padding-inline-start: 16px;'>#foreach($link in $item.fields().linkedWorkItems()) #set($req = $link.fields().workItem().get()) #set($type = $req.fields().type().get().id()) #if($type.equals('requirement')) <li>$req.render().withTitle().withIcon(false).withLinks().htmlFor().forFrame()</li> #end #end</ul>"
}
Velocity Template Scripting
Primary Context Variables
The Velocity script has access to the following primary variables:
Variable Type Description $itemWorkItem The current row’s work item; context determined by bindings property $item.fields()FieldAccessor API for accessing and rendering work item fields $item.transaction()Transaction Access to Polarion transaction for querying and searching $item.getReference()WorkItemReference Reference information including project ID and work item ID
Data Access Patterns
Accessing Standard Fields
$item.fields().title().get() {# Get field value #}
$item.fields().severity().render() {# Render field with formatting #}
Accessing Linked Work Items
#foreach($link in $item.fields().linkedWorkItems())
#set($linkedItem = $link.fields().workItem().get())
$linkedItem.fields().title().get()
#end
Filtering by Type
#set($typeId = $item.fields().type().get().id())
#if($typeId.equals('requirement'))
{# Item is a requirement #}
#end
Searching Work Items
#set($results = $item.transaction().workItems().search()
.query("type:issue AND linkedWorkItems:${item.getReference().projectId()}/${item.getReference().id()}")
.sort("id"))
#foreach($wi in $results)
{# Process each result #}
#end
Rendering Methods
Method Purpose Example .render()Prepare field for HTML rendering $field.render().htmlFor().forFrame().withTitle()Include title/label in output $item.render().withTitle().withIcon(boolean)Show/hide icon representation $item.render().withIcon(false).withLinks()Include clickable links in output $item.render().withLinks().htmlFor().forFrame()Generate frame-safe HTML content $field.render().htmlFor().forFrame()
Binding Strategies
The bindings property controls which work item is accessible as $item in your Velocity script:
Root Item Context (Default)
{
"bindings" : "$item" ,
"serverRender" : "$item.fields().title().get()"
}
Accesses the main row’s work item (risk item in FMEA/HARA contexts).
Downstream Item Context
{
"bindings" : "task.$item" ,
"serverRender" : "$item.fields().assignee().render().htmlFor().forFrame()"
}
Shifts context to a downstream linked item (e.g., mitigation task). Useful for rendering task-specific properties in separate columns.
Alternative Syntax
{
"bindings" : "$1_OBJECT_ID.item" ,
"serverRender" : "..."
}
Reference downstream items using object ID notation.
Common Use Cases
Displaying Multiple Linked Items
Render all linked work items of a specific type in an unordered list:
{
"header" : "System Requirements" ,
"serverRender" : "<ol style='margin-block-start: -16px; margin-block-end: -16px; padding-inline-start: 16px;'>#foreach($linkedWorkItem in $item.fields().linkedWorkItems()) #set($sysReq = $linkedWorkItem.fields().workItem().get()) #set($typeId = $sysReq.fields().type().get().id()) #if($typeId.equals('systemrequirement')) <li>$sysReq.render().withTitle().withIcon(false).withLinks().htmlFor().forFrame()</li> #end #end</ol>"
}
Displaying Downstream Task Properties
Show properties of downstream tasks in a separate column with filtering:
{
"header" : "Task Severity" ,
"bindings" : "task.$item" ,
"serverRender" : "<ol style='margin-block-start: -16px; margin-block-end: -16px; padding-inline-start: 16px;'>#foreach($linkedWorkItem in $item.fields().linkedWorkItems()) #set($task = $linkedWorkItem.fields().workItem().get()) #set($typeId = $task.fields().type().get().id()) #if($typeId.equals('mitigation')) <li>$task.fields().severity().render().withIcon(true).htmlFor().forFrame()</li> #end #end</ol>"
}
Querying Backlinked Items
Find all work items that link to the current item (backlinks):
{
"header" : "Affected Issues" ,
"serverRender" : "<ol style='margin-block-start: -16px; margin-block-end: -16px; padding-inline-start: 16px;'>#foreach($issueWi in $item.transaction().workItems().search().query( \" type:issue AND linkedWorkItems:${item.getReference().projectId()}/${item.getReference().id()} \" ).sort( \" id \" )) <li>$issueWi.fields().severity().render().withIcon(true).htmlFor().forFrame()</li> #end</ol>"
}
Rich Text Field Display
Display rich text fields with formatting and images preserved:
{
"header" : "Description with Images" ,
"serverRender" : "$item.fields().description().render().htmlFor().forFrame()"
}
Rich text fields (Text type with images, links, formatting) render as read-only. The render().htmlFor().forFrame() API ensures safe HTML output in the RISKSHEET context.
Script Execution Context
Server-render scripts execute on the server for every cell in the RISKSHEET. This means:
Complex queries run once per row displayed
Large result sets should be filtered or limited
Nested loops can impact performance on large datasets
Optimization Strategies
Strategy Implementation Benefit Type Filtering Use .equals() checks on type IDs Reduces data processing for irrelevant items Limit Scope Sort or limit result sets Prevents rendering hundreds of items Cache Results Store frequently-accessed data in variables Avoids redundant queries Conditional Rendering Use #if blocks to skip processing Skips work for items that won’t display
Example: Optimized Query
{
"serverRender" : "<ol>#set($results = $item.transaction().workItems().search().query( \" type:requirement \" ).sort( \" id \" ).limit(10))#foreach($wi in $results)<li>$wi.render().withTitle().htmlFor().forFrame()</li>#end</ol>"
}
Embedded CSS in server-render scripts helps control layout and appearance:
{
"serverRender" : "<ul style='margin: 0; padding-left: 16px;'>#foreach($item in $items)<li style='list-style-type: decimal;'>$item</li>#end</ul>"
}
Common Inline Styles
Style Purpose Example margin-block-start: -16pxRemove default list top margin Compact vertical spacing margin-block-end: -16pxRemove default list bottom margin Compact vertical spacing padding-inline-start: 16pxSet list indentation Standard list left padding list-style-type: noneHide bullet points Clean link display
Limitations and Constraints
Limitation Impact Workaround Server-render columns are always read-only Cannot edit values directly Create separate editable columns for input Complex queries impact performance Slow rendering on large sheets Optimize queries with type filters and limits Velocity script errors render as empty cells Missing data without error messages Test scripts in configuration editor HTML content is sanitized Some HTML/JavaScript may be filtered Use safe HTML tags; avoid script execution
Comparison with Other Column Types
Feature serverRender formula itemLink Editable No No Yes Server-side Yes No No HTML output Yes No Limited Complex logic Yes Limited No Linked items Yes No Yes
Server render columns are available in all versions of Nextedy RISKSHEET. The Velocity template engine and field rendering APIs have been stable since RISKSHEET 1.0. All examples in this reference use current API syntax compatible with RISKSHEET v24.8.1 and later.
KB Articles Support Tickets Source Code
PolarionAppConfigManager.java
ExportToPdf.ts
AppConfig.ts
risksheet.json
ExportToExcel.ts