Skip to main content

Verify the ExternalReference Entity Type

Open the domain model for your sheet (Menu > Configuration > Edit Model). In the domainModelTypes section, confirm that ExternalReference is defined:
domainModelTypes:
  ExternalReference:
The ExternalReference entity type may already exist if it is used elsewhere in your model (for example, linked to verification or validation test cases).

Add the Relationship

In the relationships section of your domain model, add a relationship from ExternalReference to the target entity. For example, to link external references to DesignRequirement:
relationships:
  - from: ExternalReference
    to: DesignRequirement
    direct:
      name: designRequirement
    back:
      name: externalReferences
The back.name value (externalReferences) becomes the expansion path used in the sources and column binding. Go to Administration > Work Item Link Roles in Polarion. Verify that the link role (for example, relatesTo):
  • Can be created from externalReference to the target work item type (for example, designOutput)
  • Is bidirectional (recommended)

Update the Sources Section

In your sheet configuration, locate the sources section and add the externalReferences expansion under the appropriate entity:
sources:
  - model: rtm
    query:
      from: UserNeed
      where: <WHERE>
      take: <TAKE>
    expand:
      - name: systemRequirements
        expand:
          - name: designRequirements
            expand:
              - name: verificationTestCases
              - name: externalReferences
The externalReferences entry sits at the same level as other relationships on designRequirement. diagram

Add the Column

Define the column in the columns section using the full binding path through the entity hierarchy. Set multiItem: true to enable multi-reference picker behavior:
header: &blue
  style: blue

columns:
  systemRequirements.systemRequirement.designRequirements.designRequirement.externalReferences.externalReference:
    title: External References
    multiItem: true
    header: *blue
    minWidth: 200
The binding path specifies the full hierarchy from the root entity down to the externalReference entity. The YAML anchor &blue reuses a previously defined header style.
The column binding path must exactly mirror the expansion path defined in the sources section. A mismatch between expansion and column binding results in an empty column with no data.

Complete Example

sources:
  - model: rtm
    query:
      from: UserNeed
      where: <WHERE>
      take: <TAKE>
    expand:
      - name: systemRequirements
        expand:
          - name: designRequirements
            expand:
              - name: externalReferences

header: &blue
  style: blue

columns:
  outlineNumber:
    title: "#"
    width: 80
    isreadOnly: true
  title:
    title: Title
    width: "*"
    hasFocus: true
  systemRequirements.systemRequirement.designRequirements.designRequirement.externalReferences.externalReference:
    title: External References
    multiItem: true
    header: *blue
    minWidth: 200

Verify

After saving the sheet configuration, reload the powersheet document. You should now see a new column displaying external references linked to each design requirement. Users can select or add external references using the multi-reference picker in each cell.

See also

KB ArticlesSource Code
  • prod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/models/permissions.yaml
  • prod-powersheet-src/com.nextedy.powersheet.client/ltc-repo/packages/common/types/api/document.ts
  • prod-powersheet-src/com.nextedy.powersheet.client/ltc-repo/cypress/e2e/Sheet/reference.spec.ts
  • prod-powersheet-src/com.nextedy.powersheet.client/ltc-repo/packages/common/types/domain/document.ts
  • prod-powersheet-src/com.nextedy.powersheet/src/META-INF/hivemodule.xml