Skip to main content

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

PropertyTypeDefaultDescription
headerstringrequiredDisplay name for the column header
idstringauto-generatedUnique identifier for the column; used to reference the column in bindings or formulas
serverRenderstringnoneVelocity 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
widthnumberautoColumn width in pixels
typestringtextColumn data type; typically text for server-rendered content
readOnlybooleantrueAlways true for server-render columns; cannot be changed
filterablebooleanfalseWhether users can filter this column; recommended false for complex content
sortablebooleanfalseWhether users can sort by this column; recommended false for custom-rendered data
headerGroupstringnoneGroups multiple columns under a single header category
headerGroupCssstringnoneCSS class for styling the header group
headerCssstringnoneCSS 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:
VariableTypeDescription
$itemWorkItemThe current row’s work item; context determined by bindings property
$item.fields()FieldAccessorAPI for accessing and rendering work item fields
$item.transaction()TransactionAccess to Polarion transaction for querying and searching
$item.getReference()WorkItemReferenceReference 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

MethodPurposeExample
.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.

Performance Considerations

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

StrategyImplementationBenefit
Type FilteringUse .equals() checks on type IDsReduces data processing for irrelevant items
Limit ScopeSort or limit result setsPrevents rendering hundreds of items
Cache ResultsStore frequently-accessed data in variablesAvoids redundant queries
Conditional RenderingUse #if blocks to skip processingSkips 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>"
}

HTML Styling and Formatting

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

StylePurposeExample
margin-block-start: -16pxRemove default list top marginCompact vertical spacing
margin-block-end: -16pxRemove default list bottom marginCompact vertical spacing
padding-inline-start: 16pxSet list indentationStandard list left padding
list-style-type: noneHide bullet pointsClean link display

Limitations and Constraints

LimitationImpactWorkaround
Server-render columns are always read-onlyCannot edit values directlyCreate separate editable columns for input
Complex queries impact performanceSlow rendering on large sheetsOptimize queries with type filters and limits
Velocity script errors render as empty cellsMissing data without error messagesTest scripts in configuration editor
HTML content is sanitizedSome HTML/JavaScript may be filteredUse safe HTML tags; avoid script execution

Comparison with Other Column Types

FeatureserverRenderformulaitemLink
EditableNoNoYes
Server-sideYesNoNo
HTML outputYesNoLimited
Complex logicYesLimitedNo
Linked itemsYesNoYes

Version Information

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 ArticlesSupport TicketsSource Code
  • PolarionAppConfigManager.java
  • ExportToPdf.ts
  • AppConfig.ts
  • risksheet.json
  • ExportToExcel.ts