Skip to main content

What this guide covers

Polarion’s Scripted Page Parameters (documented in the Polarion Widget SDK, section 7.2) let a Wiki page compute parameter values at render time using a server-side script. When combined with Planningboard’s widget parameters — such as selectedTeam, assignmentMode, or swimlane filters — this means one board page can serve multiple teams or roles without duplicating the page for every audience. A common scenario: your project has several teams and you want each team member who opens the board to see only their own swimlane, without an administrator manually maintaining ten near-identical pages.

Prerequisites

  • Planningboard is installed and a board widget is already embedded on a Polarion Wiki page.
  • You have Wiki page edit permissions in Polarion.
  • You understand the basic Planningboard widget parameters. See Widget Parameters Overview and Use Page Parameters.

1

Understand how Scripted Page Parameters work

A Scripted Page Parameter is a page-level script block that Polarion evaluates before rendering the page. The script produces a map of key/value pairs. Those values are then available to any widget on the page as named parameters — exactly as if a user had typed them into the widget’s parameter editor.
Flow from Polarion Wiki page load through the Scripted Page Parameters script evaluating server-side to produce key=value parameters, to the Planningboard widget rendering with those dynamic values
The script has access to the Polarion server context, including the current user object and their roles and group memberships. This is what enables role-aware or team-aware board filtering.
2

Add a Scripted Page Parameter block to your Wiki page

Open the Wiki page that contains your Planningboard widget for editing. In the page source, add a Scripted Page Parameters block before the widget macro. In Polarion Wiki markup, this is a module-scriptedparams macro or an equivalent script block — refer to your Polarion version’s Widget SDK for the exact syntax.The script block returns a Map<String, String>. Each key becomes a named parameter you can reference in widget configuration.Example: mapping the current user’s role to a team ID:
This produces the parameter boardTeam with a value derived from the current user’s Polarion role — no role IDs are exposed to end users.
Polarion role IDs are case-sensitive. Use the exact role ID string as it appears in Administration > Roles, not the display label. A mismatch produces no error — the condition simply never matches, and the parameter falls back to your default value.

3

Reference the parameter in the Planningboard widget

Once the script produces a named parameter, reference it inside the Planningboard widget configuration using Polarion’s standard ${paramName} substitution syntax.For example, to pass boardTeam into the selectedTeam widget property:You can use the same parameter in multiple widget properties. For instance, you could drive both the selectedTeam and a plan query filter from the same scripted value.
Always initialise the output variable before the conditional logic (as shown in Step 2). If no role condition matches, the widget receives the default value rather than an empty or null string, which could cause unexpected board behaviour.

4

Use a parameter in the Plan query

The plansQuery property accepts a Lucene query string and also supports ${param} substitution. This lets the script constrain which Plans appear as columns for the current user.Example: show only plans belonging to the user’s team prefix:
Widget configuration:When teamPlanPrefix resolves to alpha, the board loads only Plans whose ID starts with alpha.
If your scripted value might contain spaces (e.g. a team name used directly in a query), wrap it in quotes inside the query string: id:"${teamPlanPrefix}". Unquoted spaces split the Lucene term and produce unexpected results. Capacity configuration parameters are also whitespace-sensitive — test with values that include spaces before deploying.

5

Combine with the `selectedTeam` property for capacity filtering

When your board uses the Teams Service (useTeamsService = true), the selectedTeam property determines which team’s capacity is loaded. Driving this from a scripted parameter means the capacity bar automatically reflects the current user’s team without them selecting it manually.For background on the Teams Service and capacity configuration, see Set Up Teams Service and Track Team Capacity.

Configuration example — single board, three teams

The following shows the complete setup for a project with three teams (alpha, beta, gamma), each with a matching Polarion role: Scripted Page Parameters script:
Planningboard widget properties (relevant excerpt): With this configuration, a user holding the team-alpha role sees only alpha* Plans as columns and the capacity bar reflects the alpha team’s capacity. Users with no matching role see all Plans (id:all*) — adjust the fallback to your project’s needs.

Common pitfalls

If the scripted parameter block fails to execute or the key is misspelled, Polarion passes the raw ${boardTeam} string to the widget. The board may load with an unresolved query. Check the page script for syntax errors and confirm the parameter name matches exactly (case-sensitive) between the script return map and the widget property value.
A runtime error in the script block may silently return an empty map, leaving all widget properties that depend on scripted values unresolved. Enable Polarion server logging during setup, or add a fallback default before every return statement.
Before wiring up the full role-to-value logic, hardcode a known-good value in the script and confirm the widget responds correctly. Once the widget reads the parameter as expected, replace the hardcoded value with the conditional logic.

Verification

After saving the page and refreshing in a browser:
  1. Open the board as a user who holds one of the mapped roles.
  2. Confirm the columns show only the Plans matching that team’s prefix.
  3. If useTeamsService is enabled, confirm the capacity bar reflects that team’s capacity.
  4. Open the board as a second user with a different role and verify the board shows a different set of Plans.
You should now see the board adapting its content to each user’s role without any manual filter selection.

See also

KB Articles
  • Planningboard Widget Parameters
  • Planningboard: Customizable Statistics and Capacity Indicators
Support TicketsSource Code
  • Config.java
  • viewSetup.vm
  • PlanningBoardViewServlet.java
  • PlanningService.java
  • PlanningBoardWidget.java
Last modified on July 9, 2026