Skip to main content

Property Definition

PropertyTypeDefaultDescription
columns.<key>.displaystringidSpecifies which property of a referenced entity to display. Accepts a property name (title, titleOrName, id) or a JavaScript arrow function string for custom rendering.

Display Values

ValueDescription
idShows the entity’s ID (default)
titleShows the entity’s title property
titleOrNameShows the title if available, otherwise falls back to the entity name
Custom propertyAny valid property name from the referenced entity type
JS function stringArrow function returning custom HTML (see below)

Display Resolution Flow

diagram

Simple Property Display

Show the title property of a referenced Hazard entity:
columns:
  hazard:
    title: Hazard
    display: title
Show the titleOrName property with fallback:
columns:
  hazard:
    title: Hazard
    display: titleOrName

JavaScript Function Display

Use a JavaScript arrow function string to return custom HTML. The function has access to a context object.

Context Object

VariableDescription
context.valueThe current cell value (the referenced entity or property value)
context.itemThe current row item with properties like projectId, id
context.polarionModel.polarionBaseUrlBase URL of the Polarion server
columns:
  riskControls.riskControl:
    title: Risk Control
    display: >
      () => `<img
        src='${context.polarionModel.polarionBaseUrl}/polarion/icons/default/enums/type_purple_feature.png'>
        <a
          target="_blank"
          href="${context.polarionModel.polarionBaseUrl}/polarion/nx_databridge/redirect/WorkItem/${context.item.projectId}/${context.item.id}">
          ${context.value.objectId}
        </a>`
Use the > (folded scalar) indicator for multi-line JavaScript function strings in YAML. The function is evaluated in the browser at render time.

Display vs Render

Both display and render can accept JavaScript function strings, but they serve different purposes:
PropertyPrimary UseWhen to Use
displayProperty name selection for navigation columnsUse when you need to select which property of a referenced entity to show, or when using a simple JS function
renderCustom HTML cell renderingUse when display is already used for property selection and you need additional rendering control. Can also reference predefined renderer names.
When both display and render are set on the same column, render typically takes precedence for visual output. Use display for property selection and render for custom HTML when both are needed.

Complete YAML Example

columns:
  outlineNumber:
    title: "#"
    width: 80
  title:
    title: User Need
    width: 200
    hasFocus: true
  hazard:
    title: Hazard
    display: title
    list:
      search:
        - title
        - id
  riskControls.riskControl:
    title: Risk Control
    width: 160
    multiItem: true
    display: >
      () => `<img
        src='${context.polarionModel.polarionBaseUrl}/polarion/icons/default/enums/type_purple_feature.png'>
        <a
          target="_blank"
          href="${context.polarionModel.polarionBaseUrl}/polarion/nx_databridge/redirect/WorkItem/${context.item.projectId}/${context.item.id}">
          ${context.value.objectId}
        </a>`
    list:
      search:
        - title
        - id
      display: >
        () => `<img
          src='${context.polarionModel.polarionBaseUrl}/polarion/icons/default/enums/type_purple_feature.png'>
          ${context.value.objectId} ${context.value.title ? '- ' + context.value.title : ''}`

sources:
  - id: main
    model: rtm
    query:
      from: UserNeed
      where: <WHERE>
    expand:
      - name: hazards
        title: Hazards
        expand:
          - name: riskControls
            title: Risk Controls

Source references: Column Configuration Guide KB article, powersheet.yaml, whole_rtm.template.yaml
KB ArticlesSource Code
  • powersheet.yaml
  • prod-powersheet-src/com.nextedy.powersheet.client/ltc-repo/packages/common/types/domain/document.ts
  • prod-powersheet-src/com.nextedy.powersheet/src/com/nextedy/powersheet/PowersheetService.java
  • prod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/configurations/constraints_composing.template.yaml
  • prod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/configurations/whole_rtm.template.yaml