Skip to main content

Step 1: Add a Source Entry

Open your sheet configuration YAML and add an entry to the sources array. Each source requires an id, title, model, and query:
sources:
  - id: userNeeds
    title: User Needs
    model: rtm-model
    query:
      from: UserNeed
PropertyPurpose
idUnique identifier for this data source
titleDisplay label shown in the sheet UI
modelReference to the domain model ID (defined in Administration > Nextedy POWERSHEET > Models)
query.fromEntity type name from the domain model to query
The from value must match an entity type defined in your domain model (e.g., UserNeed, SystemRequirement, Hazard).

Step 2: Add a Filter with where

To restrict which entities are loaded, add a where clause to the query. The where clause uses filter predicates:
sources:
  - id: userNeeds
    title: User Needs
    model: rtm-model
    query:
      from: UserNeed
      where:
        status:
          ne: deleted
This loads only UserNeed entities whose status is not deleted. Common filter patterns:
# Equality
where:
  severity: critical

# Not equal
where:
  status:
    ne: deleted

# Null check (has value)
where:
  title:
    ne: null

# Combined conditions (AND)
where:
  and:
    - severity: critical
    - status: approved
The exact predicate syntax supported in where clauses depends on the query engine. Simple equality and comparison operators are widely supported. For complex predicate patterns, see Use Predicates.

Step 3: Add Sorting with orderBy

Control the default sort order by specifying property paths and directions:
sources:
  - id: userNeeds
    title: User Needs
    model: rtm-model
    query:
      from: UserNeed
      orderBy:
        - id asc
Append desc after the property path for descending order. You can also configure sorting at the sheet level with sortBy:
sortBy:
  - columnId: title
    direction: asc

Step 4: Add Expansion Paths

To load related entities (for multi-level hierarchical display), add an expand section to the source:
sources:
  - id: userNeeds
    title: User Needs
    model: rtm-model
    query:
      from: UserNeed
    expand:
      - name: systemRequirements
        title: System Requirements
Expansion paths follow the navigation properties defined in your domain model. For deeper hierarchies, nest expansions:
expand:
  - name: systemRequirements
    title: System Requirements
    expand:
      - name: designRequirements
        title: Design Requirements
See Expand Navigation Properties for detailed guidance on multi-level expansion.

Step 5: Limit Results with take

For performance, limit the number of entities returned:
sources:
  - id: userNeeds
    title: User Needs
    model: rtm-model
    query:
      from: UserNeed
      take: 100
Queries without a take limit or a where filter may load thousands of work items, causing slow sheet loading. Always apply appropriate filters for production configurations. See Optimize Queries for performance guidance.

Complete Example

sources:
  - id: rtm-source
    title: Requirements Traceability
    model: rtm-model
    query:
      from: UserNeed
      where:
        status:
          ne: deleted
      orderBy:
        - id asc
    expand:
      - name: systemRequirements
        title: System Requirements
        expand:
          - name: designRequirements
            title: Design Requirements

Verification

After saving the sheet configuration and opening the associated document:
  1. You should now see the sheet populated with entities matching your query
  2. Expanded relationships should display as nested rows beneath parent items
  3. The row count should reflect the filter criteria in your where clause

See Also

Source Code
  • prod-powersheet-src/com.nextedy.powersheet.client/src/modules/ModelProvider/ModelProvider.tsx
  • powersheet.yaml
  • prod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/configurations/whole_rtm.template.yaml
  • QueryProcessor.java
  • QueryDataTest.java