Skip to main content

Prerequisites

  • The enum must be defined in Polarion (either a built-in enum like severity or a custom enum)
  • The property must be included in your domain model
  • Access to the sheet configuration and domain model YAML files

Step 1: Add the Enum Property to the Domain Model

Include the enum property in your entity type’s properties section. Powersheet automatically detects enum types from Polarion metadata:
domainModelTypes:
  UserNeed:
    polarionType: user_need
    properties:
      severity: ~
      c_riskLevel: ~
When a property references a Polarion enum field, Powersheet automatically:
  1. Detects the enumeration ID from Polarion metadata
  2. Creates a data source for loading enum options
  3. Renders a dropdown picker in the sheet cell
You do not need to manually list enum values in most cases. Powersheet auto-discovers enum options from Polarion and creates the dropdown data sources dynamically.

Step 2: Understand Enum Option Scoping

Enum options in Polarion can vary depending on the context. Powersheet uses a scoping strategy to determine which options to display:
Scope FactorDescription
enumIdThe Polarion enumeration identifier
projectThe current Polarion project
polarionTypeThe work item type (e.g., user_need)
protoThe Polarion object prototype
Powersheet constructs a fully-qualified enum identifier from these factors to load the correct set of options. For example, the severity enum for UserNeed in project RTM_Demo resolves differently than severity for SystemRequirement in the same project. diagram

Step 3: Restrict Enum Values (Optional)

To limit the available options to a subset, use the enumValues property in the domain model:
domainModelTypes:
  UserNeed:
    polarionType: user_need
    properties:
      c_riskLevel:
        enumValues:
          - low
          - medium
          - high
          - critical
The values in enumValues must match Polarion enum option IDs exactly.
The IDs listed in enumValues must exactly match the option IDs defined in Polarion. A mismatch will result in the option not appearing in the dropdown.

Step 4: Set Default Values (Optional)

Powersheet automatically infers default values for enum properties from Polarion enumeration definitions. The resolution order is:
  1. Explicit default in the domain model property definition
  2. Polarion enumeration default from the enum configuration
  3. No default (null)
The default value inference depends on Polarion’s enum configuration. Verify the default behavior in the application if you need a specific initial value.

Step 5: Add the Column to Sheet Configuration

Reference the enum property in your sheet configuration:
columns:
  severity:
    title: Severity
    width: 120
The column automatically renders as a dropdown picker. Column filtering also supports enum-specific sorting (options appear in their defined order rather than alphabetically).

Step 6: Assign the Sheet Configuration to a Document

Ensure your document references the correct sheet configuration via the nextedySheetConfig custom field. See Assign Configuration to Document for details.

Step 7: Verify

Open the powersheet document. Click on a cell in the enum column. You should now see a dropdown with the expected options. Select a value, save, and confirm it persists.

See Also

KB ArticlesSource Code
  • prod-powersheet-src/com.nextedy.powersheet.client/ltc-repo/packages/common/types/api/document.ts
  • prod-powersheet-src/com.nextedy.powersheet/src/com/nextedy/powersheet/enumProvider/SheetConfigEnumProvider.java
  • DataPropertyFactory.java
  • prod-powersheet-src/com.nextedy.powersheet/src/META-INF/hivemodule.xml
  • PolarionQueryProcessor.java