Define a Basic Source
Thesources section is an array of data source definitions. Each source specifies a domain model reference, a query, and expansion paths:
| Property | Description |
|---|---|
model | Reference to the domain model that defines entity types and relationships |
query.from | Root entity type to query (must exist in the domain model) |
query.where | Filter predicate — the <WHERE> placeholder is replaced at runtime |
query.take | Maximum number of records — the <TAKE> placeholder is replaced at runtime |
expand | Array of expansion paths for loading related entities |
Expand Relationships
Theexpand array defines which related entities are loaded alongside the root entity. Each entry uses the name property corresponding to a relationship in the domain model:
expand entries create multi-level hierarchies. The expansion path structure must match the relationships defined in your domain model.
Use a Dynamic Model Reference
Instead of hardcoding the model name, you can reference a runtime parameter using a JavaScript arrow function expression:() => arrow function syntax is evaluated at runtime to resolve the model name from document parameters, enabling the same sheet configuration to work across different domain models.
Add Document Constraints
Use theconstraints property to scope source data to the current Polarion document:
applyCurrentDocumentTo property filters the specified entity type to only include items from the current document context.
Verify
After saving the sheet configuration, reload the powersheet document. You should now see rows populated with data from the root entity type, with related entities expanded as columns according to your expansion paths.See also
- Expand Navigation Properties
- Use Model Helper Widget
- Creating Your First Sheet Configuration
- Add a Column
Sources
Sources
KB ArticlesSupport TicketsSource Code
prod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/configurations/constraints_composing.template.yamlprod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/configurations/whole_rtm.template.yamlprod-powersheet-src/com.nextedy.powersheet.client/src/modules/Powersheet/Powersheet.tsxprod-powersheet-src/com.nextedy.powersheet/src/com/nextedy/powersheet/enumProvider/SheetConfigEnumProvider.javaprod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/configurations/permissions-levels.template.yaml