Define a Basic Source
Thesources section is an array at the root level of your sheet configuration YAML. Each source specifies a unique identifier, the data model it queries against, a query targeting an entity type, and optional expansion paths:
Expand Relationships
Theexpand array defines which related entities are loaded alongside the root entity. Each entry uses the name property corresponding to a navigation property from your data model relationships:
expand entries create multi-level hierarchies. The expansion path structure must match the direct and back navigation property names defined in your data model relationships.
Expansion by Cardinality
The cardinality of a relationship determines the expand pattern and how columns bind to expanded data:
For many-to-many relationships, the expand must go through the association entity first, then to the target entity. This two-level expand pattern is required:
Filter with a WHERE Clause
Use thequery.where property to restrict which entities are loaded. The where clause uses predicate syntax:
() => arrow function syntax to build runtime-evaluated filters. For example, to filter by a date or a document parameter:
The
() => notation evaluates at runtime. For date predicates, ensure the expression returns an ISO string using .toISOString(). For parameters, use context.parameters.<name> to inject values from the document configuration.Set Default Values with Entity Factory
TheentityFactory property defines default property values applied when a user creates a new entity from the sheet. This works at any expand level:
Configure Multiple Sources
A sheet configuration can define multiple sources. Each source must have a uniqueid and reference a model:
Limit Results with Take
Usequery.take to cap the number of root entities returned by a source. This is useful for large datasets where loading all entities would impact performance:
Complete Configuration Example
Here is a full sources section for a requirements traceability matrix that queries user needs, expands through system requirements to design requirements, and sets default values for new entities:Verify Your Configuration
After saving your sheet configuration YAML:- Open the Powersheet document in Polarion
- The sheet should load and display the root entities defined by
query.from - Verify that expansion arrows appear on rows — clicking them loads related entities at each level
- Create a new entity to confirm
entityFactorydefaults are applied correctly - If using
wherefilters, confirm that only matching entities appear
See Also
- Expand Navigation Properties — detailed guide on expansion paths and cardinality patterns
- Add a Column — bind columns to properties from your expanded sources
- Configure a Relationship — set up
directandbacknavigation properties in the data model - Use Model Helper Widget — visual tool for exploring data model structure
- Configure Dynamic Expressions — full reference on
() =>expression syntax and the context object - Write an Entity Query — query syntax for
from,where, andorderByclauses