Step 1: Open the Domain Model
- Navigate to Administration > Nextedy POWERSHEET > Domain Models
- Select the domain model you want to edit
- Locate the entity type under
domainModelTypeswhere you want to add constraints
Step 2: Understand the Three Constraint Stages
Powersheet supports three constraint stages, each controlling a different operation:| Stage | Purpose | Effect |
|---|---|---|
load | Filters which entities are visible in the sheet | Only matching entities appear when data loads |
pick | Filters picker dialog options | Only matching items appear in relationship pickers |
create | Sets defaults for new entities | New items are created in the specified document location |
Stages cascade upward: pick inherits
load constraints, and create inherits both load and pick. If no create constraints are defined, the system falls back to pick constraints for the create stage.Step 3: Add Load Constraints
Load constraints filter which entities are visible when data loads into the sheet. Add aconstraints block with load to the entity type:
UserNeed work items that exist in documents of type stakeholderRequirement will appear in the sheet.
Step 4: Add Pick Constraints
Pick constraints filter what appears in relationship picker dialogs. This is useful when users link entities and you want to restrict which items they can select:SystemRequirement through a relationship picker, only items from the Requirements space in documents of type systemSpecification are shown.
Step 5: Add Create Constraints
Create constraints specify the default document location when new items of this type are created through the sheet:DesignRequirement from the sheet, it will be placed in the Design Specification document within the Design space.
Step 6: Combine Multiple Stages
You can define multiple constraint stages on the same entity type. Each stage applies to its respective operation, and cascading applies automatically:- Load stage: only system requirements from
systemSpecificationdocuments are visible - Pick stage: inherits the load filter, plus restricts to the
Requirementsspace - Create stage: inherits both, plus targets a specific document name
Step 7: Use Comparison Operators
Constraint values support five comparison operators beyond exact matching:| Operator | Behavior | Example |
|---|---|---|
| (default) | Exact equality | type: systemSpecification |
contains | Substring match | moduleName: { contains: Spec } |
in | Matches any value in a list | type: { in: [systemSpec, designSpec] } |
startsWith | Prefix match | moduleFolder: { startsWith: Req } |
endsWith | Suffix match | moduleName: { endsWith: Specification } |
type: systemSpecification), the equals operator is applied by default. To use another operator, wrap the value in an operator object:
Step 8: Use Logical Operators
Multiple properties within the samedocument block are combined with AND logic — all conditions must match simultaneously.
For OR logic, use the or keyword inside the document block to match entities from multiple locations:
Step 9: Use Dynamic Context References
For component-scoped relationships, use$context.source.document.component to dynamically filter based on the source entity’s document component:
UserNeed in a document with component “Braking System”, the picker will only show system requirements from documents that also belong to the “Braking System” component.
Constrainable Document Properties
Thedocument block in constraints supports the following properties:
| Property | Description |
|---|---|
moduleFolder | The space (folder) where the document resides in the project hierarchy |
moduleName | The exact name of the target document |
type | The document type ID (as defined in Polarion configuration) |
id | The document ID in folder/name format |
title | The document display title |
component | The component property of the document, often used with $context |
Verification
After saving the domain model with constraints:- Open a sheet that uses this domain model
- For load constraints: verify that only matching entities appear in the sheet rows
- For pick constraints: click a relationship picker cell and verify the dropdown shows only items matching your filter criteria
- For create constraints: create a new item through the sheet and verify it appears in the expected document location
type ID and moduleFolder values.
See Also
- Configure Context Constraints — advanced context-based constraint patterns
- Configure a Relationship — setting up relationships that constraints apply to
- Create an Entity Type — defining the entity types that hold constraints
- Create an Entity Type — ensuring
polarionTypevalues are correct - Data Model Reference — complete constraints property reference
Sources
Sources
KB ArticlesSupport TicketsSource Code
- DomainModelTypeV2.java
- DomainModelV2.java
- Relationship.java
- Direction.java