> ## 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.

# Template Functions

> Use Nextedy PLANNINGBOARD's built-in template variables to generate dynamic URLs for plan column headers and swimlane labels, enabling direct navigation to related reports, plans, and resources from the board.

## What You Can Parametrize

Planningboard exposes two report-link parameters — one for Plan columns and one for swimlane rows. Both accept a URL string with embedded template variables that are resolved at render time.

| Parameter    | Scope               | Template variables available                            |
| ------------ | ------------------- | ------------------------------------------------------- |
| `planLink`   | Plan column headers | `${plan.objectId.projectId}`, `${plan.objectId.itemId}` |
| `reportLink` | Swimlane row labels | `${r.objectId.itemId}`                                  |

The resolved URL is opened when a user clicks the column label or swimlane label on the board.

<Steps>
  <Step title="Add a Report Link to Plan Columns">
    1. Open the Planningboard widget parameter editor (click **Edit Parameters** in the board toolbar or edit the page in Polarion).
    2. Scroll to the **Parameters for Plans (Columns)** section.
    3. Locate the **Report Link** field.
    4. Enter a URL template using `${plan.objectId.projectId}` and `${plan.objectId.itemId}` to reference the plan bound to that column.

    **Example** — link each plan column to its Polarion plan detail page:

    ```
    /polarion/#/project/${plan.objectId.projectId}/plan?id=${plan.objectId.itemId}
    ```

    **Example** — link each plan column to a Wiki report page filtered by plan:

    ```
    /polarion/#/project/${plan.objectId.projectId}/wiki/SOME_REPORT?plan=${plan.objectId.itemId}
    ```

    The variable `${plan.objectId.projectId}` resolves to the Polarion project ID (e.g. `MyProject`). The variable `${plan.objectId.itemId}` resolves to the Plan ID (e.g. `Iteration_4`).

    <Tip>
      Use this link to open a sprint burndown or velocity report that is pre-filtered to the plan in that column — users can navigate directly from the board without manually setting filters.
    </Tip>
  </Step>

  <Step title="Add a Report Link to Swimlane Labels">
    1. In the widget parameter editor, scroll to the **Swimlanes (Rows)** section.
    2. Locate the **Report Link** field under swimlane configuration.
    3. Enter a URL template using `${r.objectId.itemId}` to reference the resource (user, team, or enum value) bound to that swimlane.

    **Example** — link each user swimlane to a wiki report filtered by user:

    ```
    /polarion/#/project/PlanningBoard/wiki/SOME_REPORT?user=${r.objectId.itemId}
    ```

    The variable `${r.objectId.itemId}` resolves to the resource identifier for the swimlane — typically a Polarion user ID when the swimlane assignment type is user/assignee-based.

    <Warning>
      The `${r.objectId.itemId}` variable resolves to the resource identifier for the current swimlane assignment type. If you switch assignment type (for example from **Users (Assignee)** to **Enumeration Field**), the resolved value changes accordingly — verify the link target is still meaningful for the new assignment type.
    </Warning>
  </Step>

  <Step title="Verify the Links">
    1. Save the widget parameters and reload the board page.
    2. Click a **column header** (plan label) — the browser should open the URL you configured, with the `${plan.*}` variables replaced by the actual plan's project ID and item ID.
    3. Click a **swimlane label** — the browser should open the URL with `${r.objectId.itemId}` replaced by the resource identifier for that row.

    You should now see the report or target page open with the correct plan or user filter already applied, with no manual parameter entry needed.
  </Step>
</Steps>

## Reference: Template Variable Summary

<Frame>
  <img src="https://mintcdn.com/none-17b4493f/zUlmOSLBIQ0HyaAX/planningboard/diagrams/guides/advanced/template-functions/diagram-1.svg?fit=max&auto=format&n=zUlmOSLBIQ0HyaAX&q=85&s=a12220759d9d5c84eeaf610ef2fe4fc8" alt="Reference table of plan column and swimlane label template variables and what each resolves to" width="900" height="280" data-path="planningboard/diagrams/guides/advanced/template-functions/diagram-1.svg" />
</Frame>

## Common Pitfalls

<Warning>
  **Hardcoded project ID breaks cross-project boards.** If you hard-code a project ID in the URL instead of using `${plan.objectId.projectId}`, the link will navigate to the wrong project when the board is used in a different project context. Always use the template variable.
</Warning>

<Warning>
  **URL must be an absolute Polarion path.** The Report Link value is rendered as an `href` directly. Relative paths (without a leading `/polarion/`) may not resolve correctly depending on the browser's current path. Start links with `/polarion/#/project/...`.
</Warning>

<Tip>
  When building the link URL, test the target page first by navigating to it manually in Polarion, then copy the URL and replace the static plan/user IDs with the corresponding template variables.
</Tip>

## See Also

* [Widget Parameters Overview](/planningboard/guides/configuration/widget-parameters) — full reference for all widget parameters including Report Link fields
* [Configure Plans (Columns)](/planningboard/guides/configuration/plans-configuration) — set up which Plans appear as columns
* [Configure Swimlanes (Rows)](/planningboard/guides/configuration/swimlanes-configuration) — set up swimlane assignment type and row configuration
* [Use Page Parameters](/planningboard/guides/configuration/page-parameters) — pass dynamic values into the board from the Polarion page URL
* [Dynamic Filtering with Page Parameters](/planningboard/guides/advanced/dynamic-filtering) — filter the board using URL-level parameters

<Accordion title="Sources">
  **KB Articles**

  * Planningboard Widget Parameters
  * Planningboard: Customizable Statistics and Capacity Indicators

  **Support Tickets**

  * [#5879](https://support.nextedy.com/helpdesk/tickets/5879)
  * [#6174](https://support.nextedy.com/helpdesk/tickets/6174)

  **Source Code**

  * `viewSetup.vm`
  * `Config.java`
  * `viewLicense.vm`
  * `PlanningBoardWidgetRenderer.java`
  * `PlanningBoardSetupService.java`
</Accordion>
