Skip to main content
Sources are the bridge between the data model (which defines entity types and relationships) and the sheet columns (which define how data is displayed). The data model declares what entities and relationships exist; sources declare which of those entities to load and which relationships to expand; columns declare how to render the resulting data.
Understanding how sources connect to the data model and columns is essential. See Cardinality for the full relationship between these three configuration layers.

Source Data Flow

diagram

Top-Level Source Properties

The sources key is a top-level array in the sheet configuration YAML, alongside columns, views, formatters, and other sections.
The first source in the array (sources[0]) is the primary data source for the sheet. Additional sources can define secondary entity types for multi-type configurations.

Query Properties

The query object within each source defines how to retrieve root-level entities from Polarion.

Dynamic Where Clauses

The where property supports dynamic value expressions using the () => syntax. The predicate value is evaluated at runtime, allowing queries that depend on document parameters, the current date, or other context values. The resulting value must match the expected type for the property being filtered. For example, date comparisons require ISO 8601 format strings. Static filter example:
Dynamic filtering with document parameters:
Date-based filtering example:
Dynamic expressions must be valid JavaScript arrow functions starting with () =>. The resulting value must be in the correct format for the property type. For dates, always use .toISOString() in the expression to produce a properly formatted string.

Expand Properties

The expand array defines which related entities to load by traversing navigation properties declared in the data model relationships. Expansion paths determine the hierarchical depth of the sheet and directly control which columns can be bound to the loaded data.

Single-Level Expansion

For one-to-many (1:N) or many-to-one (N:1) relationships, a single expansion level is sufficient. N:1 example (each UserNeed belongs to one Chapter):
Here chapter is a direct navigation property from the data model, loading the single parent Chapter entity for each UserNeed. 1:N example (each Chapter has many child UserNeed entities):
Here userNeeds is a back navigation property. The expansion creates child rows in the sheet for each related UserNeed.

Nested Expansion (Multi-Level)

For many-to-many (M:N) relationships, or when building deep hierarchies, use nested expand entries. M:N relationships use an association entity, so the expansion path traverses two levels: the association collection and then the target entity.
This creates a four-level hierarchy: UserNeed > SystemRequirement (via M:N association) > DesignRequirement (via M:N association). Each M:N hop requires two expand levels: one for the association collection (systemRequirements) and one for the target entity (systemRequirement).
There is no hard limit on nesting depth, but deeper hierarchies increase data load and rendering time. A typical RTM configuration uses 3-5 expansion levels.

Cardinality and Expand Patterns

The relationship cardinality in the data model determines the correct expand pattern: For comprehensive examples of each cardinality pattern with matching data model, source, and column configurations, see Cardinality.

Entity Factory

The entityFactory object defines default property values that are automatically applied when a user creates a new entity from the sheet. This can be specified at the source level (for root entities) or within an expand entry (for child entities at that expansion level).
In this example, new UserNeed entities default to severity: "medium" and status: "draft", while new association entities at the systemRequirements level default to status: "proposed".

Dynamic Entity Factory Values

Entity factory values support dynamic value expressions using the () => syntax, allowing defaults that reference document parameters or computed values:

Complete YAML Example

A full RTM (Requirements Traceability Matrix) source configuration demonstrating multi-level expansion, query filtering, and entity factories:
This configuration:
  1. Queries all UserNeed entities where severity is not null
  2. Expands through the M:N relationship to SystemRequirement via the systemRequirements association
  3. Further expands through the M:N relationship to DesignRequirement via the designRequirements association
  4. Sets a default severity of "medium" for newly created UserNeed entities

Alternative: Hazard-Based Source

A risk management source starting from Hazard entities:

Configuration Scoping

Sheet configurations (including sources) can be defined at two scopes: Both global and project-specific configurations are discovered automatically and presented in the Administration > Nextedy Powersheet configuration interface. No default configuration is predefined; administrators must explicitly select a configuration for each document.

Interaction with Other Configuration Sections

Sources do not exist in isolation. They connect to several other sheet configuration sections:
  • Columns: Column binding paths (the key of each column entry) must align with the navigation properties defined in the source expansion paths. A column key like systemRequirements.systemRequirement.title requires that the source expands through systemRequirements and then systemRequirement.
  • Views: Views override column visibility but do not change source definitions. The same sources feed all views.
  • Formatters: Formatters apply conditional styling to cells. The context.item available in formatter expressions refers to entities loaded by the sources.
  • Sort By: Client-side sorting is applied after source data is loaded. The columnId in sortBy entries must reference columns that are bound to source data.
  • Binding Syntax: The dot-notation paths used in column keys directly mirror the navigation property names from source expansion paths.
  • Constraints: A source’s query/where filters which root entities load at the sheet level. Restricting which items can be picked, linked, or created (or scoping a load to the current document) is defined separately as data-model constraints (load/pick/create), not in sources. The two are independent layers that combine with AND; they are not alternative formats.

Best Practices

Begin with a minimal single-source configuration and extend incrementally. Jumping directly to complex multi-source, multi-level configurations leads to hard-to-diagnose errors. Validate each expansion level before adding the next.
  • Match expand to columns: Every column binding path that traverses a navigation property requires a corresponding expand entry in the source. A missing expand results in empty columns.
  • Use entity factories for required fields: If the target Polarion work item type has required custom fields, set defaults in entityFactory to avoid save validation errors.
  • Limit query scope with where: Use filter predicates to reduce the number of root entities loaded, improving sheet load performance.
  • Name sources descriptively: Use meaningful id values (e.g., user_needs, hazards) rather than generic names. The title property provides the human-readable label in the UI.

Related pages: Sheet Configuration Reference | Columns | Relationships | Cardinality | Dynamic Value Expressions | Binding Syntax
Last modified on July 10, 2026