Enum Property Configuration
Enum properties are defined in the domain model with theenumValues property or automatically detected from Polarion custom field metadata.
| Name | Type | Default | Description |
|---|---|---|---|
name | string | Required | Property name unique within the entity type |
enumValues | array | null | List of valid enum option IDs; must match Polarion enum IDs |
customFieldName | string | null | Polarion custom field ID when the property maps to a custom field |
type | string | Auto-detected | Set to enum explicitly or auto-detected from Polarion metadata |
readable | boolean | true | Controls whether the property can be read by clients |
updatable | boolean | true | Controls whether the property can be modified by clients |
scalar | boolean | true | true for single-select enum, false for multi-select |
Enum Resolution Flow
Powersheet resolves enum options using a multi-key strategy that scopes available options based on context (project, entity type, and prototype).Enum Query Key Strategies
Powersheet uses three query key strategies to determine which metadata keys are needed to resolve enum options:| Strategy | Keys Used | Applied When |
|---|---|---|
| Proto-only | proto | Work item type (work-item-type) and document type (document-type) enums |
| Enum ID + Project | enumId, project | Enums scoped to a specific project |
| Default | proto, project, polarionType, enumId | All other enumeration types |
Default Value Resolution
Enum properties follow a priority chain for default values:- Explicit domain model default — Value specified in the property configuration
- Polarion enumeration default — Default option defined in the Polarion enumeration
null— No default if neither source provides one
Enum Constraints and Filtering
Enum options can be filtered based on context using constraints. This is especially important for thetype enum field, which controls which work item types appear in creation dialogs.
Type Enum Filtering
When an entity type supports multiple Polarion work item types via thepolarionType array configuration, the type enum dropdown shows only the allowed types:
Multi-type entity behavior — where a single entity type maps to multiple Polarion work item types — may require additional constraint configuration for correct document routing. Verify the full constraint setup in your application.
Document-Based Enum Scoping
TheallowedWITypes property on document entity types enables automatic filtering of type enum options based on which document the entity belongs to.
Save Behavior
Enum values are saved using their Polarion option ID (not display label). The save operation validates that the submitted value matches a valid option for the field.| Operation | Behavior |
|---|---|
| Save new entity | Enum value must be a valid option ID for the field |
| Update existing | Original value tracked for change detection |
| Multi-select | Collection of option IDs stored as list |
Complete YAML Example
Related Pages
- Primitive Types — Non-enum field type reference
- Custom Fields — Custom field mapping to enum properties
- Type Conversion — How enum types are converted internally
- Properties — Domain model property definitions
- Constraints — Constraint configuration for filtering
Sources
Sources
Source Code
prod-powersheet-src/com.nextedy.powersheet.client/ltc-repo/packages/common/types/domain/document.tsDataPropertyFactory.javaProperty.javaprod-powersheet-src/com.nextedy.powersheet.client/cypress/e2e/userFlows/multiple-entity-type-flow.cy.tsprod-powersheet-src/com.nextedy.powersheet.client/ltc-repo/packages/common/types/api/document.ts