Skip to main content

Prerequisites

Available Platform Services

Powersheet automatically injects the following Polarion services into every server-rendered template evaluation context:
diagram
1

Use $trackerService to Query Work Items

The $trackerService provides access to Polarion’s tracker for querying work items and project data:
Each call to $trackerService methods executes against the Polarion database. Avoid expensive queries like getDataService().searchInstances() in templates that render for every row in a large sheet.
2

Use $repositoryService for Repository Metadata

The $repositoryService provides access to project-level metadata, users, and roles:
The service context is cached across all template evaluations within a single query. Methods that return static data (project names, user names) are efficient to call repeatedly.
3

Use $securityService for Permission Checks

The $securityService enables role-based visibility and permission-aware computed values:
Use cases for $securityService:
  • Show or hide sensitive data based on user role
  • Display different labels depending on write permissions
  • Create audit-friendly computed fields showing access status
4

Use $tx for Transaction Context

The $tx variable provides access to the current transaction, useful for read-only operations that need transactional consistency:
The exact methods available on each service depend on your Polarion version and API. Consult your Polarion SDK documentation for the complete method reference of ITrackerService, IRepositoryService, ISecurityService, and ITransactionService.
5

Combine Multiple Services

For complex computed properties, combine several services in a single template:
6

Handle Service Errors

If a service call fails, the template engine returns #SERVER_RENDER_ERROR. Protect against common failures:
If you see #SERVER_RENDER_ERROR in the sheet, the Velocity template failed. Check the Polarion server logs for the specific exception — common causes include null pointer access, invalid method calls, or missing resources.

Verify

After adding service-based computed properties:
  1. Open the powersheet document in Polarion
  2. You should now see computed values populated from platform services
  3. Test with different user accounts to verify permission-aware fields display correctly
  4. If any cells show #SERVER_RENDER_ERROR, consult the Debug Template Errors guide

See Also

Last modified on July 10, 2026