Constraint Types Overview
| Constraint Type | Purpose | When Applied |
|---|---|---|
load | Filters which entities are loaded and displayed in the sheet | At query/load time |
create | Specifies default values for newly created entities | At entity creation time |
pick | Filters which entities appear in selection dropdowns | When opening a picker dialog |
Constraint Properties
All three constraint types share the samedocument sub-properties for document-based filtering:
| Name | Type | Default | Description |
|---|---|---|---|
constraints | object | None | Top-level constraint container for an entity type. Contains load, create, and/or pick sub-objects. |
load | object | None | Query constraint defining which entities to load. Filters entities based on document properties or other criteria. |
create | object | None | Default value constraint specifying initial values for newly created entities. |
pick | object | None | Picker constraint filtering which entities appear in selection dropdowns when creating relationships. |
Document Constraint Properties
Each constraint type accepts adocument object with the following properties:
| Name | Type | Default | Description |
|---|---|---|---|
document | object | None | Document-based constraint object specifying document properties for filtering or defaults. |
document.moduleFolder | string | None | Polarion module folder (space) path for document location constraints. |
document.moduleName | string | None | Polarion module (document) name for exact name matching. |
document.type | string | None | Polarion document type for constraints. Filters documents by their type classification. |
document.component | string | None | Polarion component for constraints. Supports $context references for dynamic scoping. |
Load Constraints
Load constraints filter which entities are visible when loading data into the sheet. They apply query-time filtering based on document properties.Create Constraints
Create constraints restrict where new work items of a specific type can be created, specifying the target document for new entities.SystemRequirement, it will automatically be placed in the document at Requirements/System Requirements with the systemSpecification document type.
Pick Constraints
Pick constraints filter which entities are available in relationship picker dialogs. They scope the options users see when selecting linked items.Dynamic Context References
Constraints can use$context references for dynamic scoping based on the source entity’s properties:
| Context Reference | Description |
|---|---|
$context.source.document | Reference to the source entity’s document properties. |
$context.source.document.component | Dynamically resolves to the component property of the source entity’s document. |
Navigation Property Constraints
Constraints can also be applied to individual navigation properties within relationships, enabling context-aware filtering on specific expansion paths:userNeeds back-navigation to only include items from documents with the same component as the source entity’s document.
Source-Level Constraints
The sheet configurationsources section supports applyCurrentDocumentTo, which constrains a specific entity type to the current document context:
Complete YAML Example
Related pages: Domain Model Types | Properties | Storage | Sources
Sources
Sources
KB ArticlesSupport TicketsSource Code
prod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/configurations/constraints_model.template.yamlprod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/models/constraints-base.yamlmodel.yamlConstraints.javaprod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/configurations/constraints_currentDocument_downstream.template.yaml