Step 1: Open the Domain Model
- Navigate to Administration > Nextedy POWERSHEET > Domain Models
- Select the model you want to edit
- Locate the entity type under
domainModelTypeswhere you want to add constraints
Step 2: Understand the Three Constraint Types
Powersheet supports three constraint types, each controlling a different operation:| Constraint | Purpose | Effect |
|---|---|---|
load | Filters which entities are visible in the sheet | Only matching entities appear when data loads |
create | Sets defaults for new entities | New items are created in the specified location |
pick | Filters picker dialog options | Only matching items appear in relationship pickers |
Step 3: Add Pick Constraints
Pick constraints filter what appears in relationship picker dialogs. Add aconstraints block with pick to the entity type:
SystemRequirement through a relationship, only items from the Requirements folder in documents of type systemSpecification are shown.
Step 4: Add Create Constraints
Create constraints specify default document location when new items of this type are created:Step 5: Add Load Constraints
Load constraints filter which entities are visible when data loads into the sheet:Step 6: Use Dynamic Context References
For component-scoped relationships, use$context.source.document.component to dynamically filter based on the source entity’s document:
Step 7: Apply Constraints on Navigation Properties
Constraints can also be applied to individual relationship directions using theconstraints block inside direct or back:
Available Constraint Properties
| Property | Scope | Description |
|---|---|---|
document.moduleFolder | pick, create, load | Filter by Polarion module folder path |
document.moduleName | pick, create, load | Filter by exact document name |
document.type | pick, create, load | Filter by Polarion document type |
document.component | pick, create, load | Filter by document component (supports $context) |
Verify
After saving the domain model, open a powersheet document that uses this model. You should now see:- Pick constraints: Picker dialogs show only items matching the filter criteria
- Create constraints: New items appear in the specified document location
- Load constraints: Only matching entities are visible in the sheet
See Also
- Configure a Relationship — set up relationships between entity types
- Configure Picker Filters — additional picker filtering options
- Validate Your Data Model — check your model for errors
- Handle Validation Errors — troubleshoot constraint violations
Source reference
Source reference
constraints-base.yaml, constraints_dynamic_relation.yaml, Constraints.java, model.yaml
Sources
Sources
KB ArticlesSupport TicketsSource Code
model.yamlprod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/models/constraints-base.yamlJsonGson.javaSchemaGenerator.javaDirection.java