Prerequisites
- A data model with at least one server-rendered property (see Create a Computed Property)
- Familiarity with Velocity template syntax
Available Platform Services
Powersheet automatically injects the following Polarion services into every server-rendered template evaluation context:1
Use $trackerService to Query Work Items
The
$trackerService provides access to Polarion’s tracker for querying work items and project data:2
Use $repositoryService for Repository Metadata
The
$repositoryService provides access to project-level metadata, users, and roles:3
Use $securityService for Permission Checks
The Use cases for
$securityService enables role-based visibility and permission-aware computed values:$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:Verify
After adding service-based computed properties:- Open the powersheet document in Polarion
- You should now see computed values populated from platform services
- Test with different user accounts to verify permission-aware fields display correctly
- If any cells show
#SERVER_RENDER_ERROR, consult the Debug Template Errors guide
See Also
- Create a Computed Property — defining server-rendered properties
- Use Velocity Templates — template syntax and patterns
- Debug Template Errors — troubleshooting rendering failures
- Set Entity Permissions — entity-level access control