Skip to main content

Prerequisites

  • A working domain model with entity types and relationships defined
  • Access to Administration > Nextedy POWERSHEET > Domain Models
  • Knowledge of your Polarion document structure (module folders, document types, components)

Step 1: Identify the Target Entity Type

Open your domain model YAML and locate the entity type whose picker you want to filter. For example, to filter which SystemRequirement items appear when linking from a UserNeed:
domainModelTypes:
  UserNeed:
    polarionType: requirement
    properties:
      description: ~
  SystemRequirement:
    polarionType: systemRequirement
    properties:
      description: ~

Step 2: Add Pick Constraints

Add a constraints.pick section to the target entity type. The document sub-property filters by document location:
domainModelTypes:
  SystemRequirement:
    polarionType: systemRequirement
    properties:
      description: ~
    constraints:
      pick:
        document:
          moduleFolder: "Requirements"
          type: "systemRequirementsSpec"
This restricts the picker to show only system requirements from documents in the Requirements folder with document type systemRequirementsSpec.

Step 3: Available Filter Properties

Use the following properties inside constraints.pick.document to narrow picker results:
PropertyDescriptionExample
moduleFolderRestricts to a specific module folder (space)"Requirements"
moduleNameRestricts to a specific document by name"System Requirements"
typeRestricts to documents of a specific document type"systemRequirementsSpec"
componentRestricts by document component property"Braking"
The type property must use the Polarion document type ID (e.g., systemRequirementsSpec), not the human-readable display name (e.g., “System Requirements Specification”). Using the display name will silently return no results.

Step 4: Use Dynamic Context References

For component-scoped filtering, use $context.source.document.component to dynamically match the source entity’s component:
domainModelTypes:
  DesignRequirement:
    polarionType: designRequirement
    properties:
      description: ~
    constraints:
      pick:
        document:
          moduleFolder: "Design"
          type: "designSpec"
          component: $context.source.document.component
This ensures that when a user picks a DesignRequirement, only items from the same component as the source document are shown. diagram

Step 5: Combine Multiple Constraints

You can specify multiple filter properties together. All conditions are applied as an AND filter:
constraints:
  pick:
    document:
      moduleFolder: "Design"
      moduleName: "Design Specification"
      type: "designSpec"
      component: $context.source.document.component
Begin with a single constraint (e.g., moduleFolder) and verify it works before combining additional filters. This makes it easier to identify which constraint is causing unexpected filtering.

Verification

After saving your domain model changes:
  1. Open a powersheet document that uses this model
  2. Click on a cell in a relationship column for the constrained entity type
  3. You should now see only work items matching your filter criteria in the picker dropdown
  4. Verify that items from other folders, document types, or components are excluded

See Also


Sources: Constraints.java, model.yaml, whole_rtm.template.yaml, wholeRTM.cy.ts
KB ArticlesSource Code
  • prod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/configurations/whole_rtm.template.yaml
  • prod-powersheet-src/com.nextedy.powersheet.client/ltc-repo/packages/sheet/SheetComponent.tsx
  • model.yaml
  • Constraints.java
  • prod-powersheet-src/com.nextedy.powersheet.client/cypress/e2e/userFlows/wholeRTM.cy.ts