> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nextedy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Data Sources and Scoping

> Data Sources and Scoping — common questions about Nextedy POWERSHEET.

export const LastReviewed = ({date, state}) => {
  if (!date) return null;
  const formatted = new Date(`${date}T00:00:00Z`).toLocaleDateString("en-US", {
    year: "numeric",
    month: "long",
    day: "numeric",
    timeZone: "UTC"
  });
  const label = state === "reviewed" ? `Last reviewed and confirmed up to date on ${formatted}` : `Last updated on ${formatted}`;
  return <p className="mt-10 text-sm text-gray-400 dark:text-zinc-500 not-prose">
      {label}
    </p>;
};

<AccordionGroup>
  <Accordion title="How do data sources work in the sheet configuration?">
    The `sources` section defines how Powersheet queries data from Polarion. Each data source specifies a `model` reference, a `from` entity type, optional `where` filters, `expand` paths for loading related entities, and `take` limits. Powersheet automatically applies document-scoping constraints to all queries, ensuring data is filtered to the current document context.

    ```yaml theme={null}
    sources:
      - model: my-rtm-model
        from: UserNeed
        where: "type:user_need"
        take: 500
        expand:
          - systemRequirements
    ```
  </Accordion>

  <Accordion title="Can I use dynamic values in my configuration?">
    Yes. Sheet configurations support `$context` expressions that are resolved at runtime. For example, `$context.document.id` resolves the current document path, and `$context.source.project.id` resolves the source entity's project. Dynamic values are also used in constraint definitions to route entity creation based on the source entity type.
  </Accordion>

  <Accordion title="Can multiple documents share the same configuration?">
    Yes. Sheet configurations are standalone YAML files stored in the repository. Multiple Powersheet documents can reference the same configuration file through the `nextedySheetConfig` custom field. This is the recommended approach for maintaining consistent views across related documents. Global configurations (stored at the repository level) can be shared across all projects in your Polarion instance.
  </Accordion>
</AccordionGroup>

<LastReviewed date="2026-07-02" />
