Prerequisites
- An existing risksheet with link columns (
itemLink,multiItemLink, ortaskLink) - Administrator access to edit
risksheet.json - Familiarity with upstream traceability columns or downstream traceability columns
Filter Link Suggestions with queryFactory
The queryFactory property connects a link column to a JavaScript function that generates dynamic query constraints. When users search for items to link, the query factory filters the results based on the current row context.
Step 1: Register a Query Factory Function
Query factory functions are registered on the globalwindow.risksheet.queryFactories object. Add your function using a TopPanel script or a wiki page script block:
Step 2: Reference the Query Factory in Column Configuration
Add thequeryFactory property to the link column in risksheet.json:
multiItemLink columns. The editor applies the filter each time the user searches, requiring a minimum of 3 characters before the search triggers.
Make Link Columns Conditionally Read-Only
Use cell decorators with thesystemReadOnlyFields property to prevent linking based on other field values:
Enable Link Role Compliance
Starting with version 24.2.2, Risksheet supports thecheckLinkRoleCompliance property for multiple link roles from risk items. This must be explicitly enabled:
- Navigate to Polarion Administration > Configuration Properties
- Add:
nextedy.risksheet.checkLinkRoleCompliance=true - Save and restart the Polarion service
Link Column Behavior Summary
| Feature | itemLink | multiItemLink | taskLink |
|---|---|---|---|
| Query factory | Supported | Supported | Supported |
canCreate | Yes (default true) | Yes (default true) | N/A |
| Duplicate prevention | N/A (single item) | Automatic | N/A |
| Context menu navigation | Open Linked Item | Open Linked Item | Open Task Item |
readOnly override | Supported | Supported | Supported |
Troubleshooting
Query factory function not called — Verify the function is registered onwindow.risksheet.queryFactories before the risksheet loads. Check that the queryFactory value matches the registered function name exactly.
“This item is already linked to selected row” — The multiItemLink editor prevents duplicate links automatically. Each work item can be linked only once per cell.
“Invalid column config, itemLink bindings without dot” — The column binding for an itemLink column must include a dot separator (e.g., requirement.title). Verify your column binding format.
Verify
After configuring thequeryFactory, reload the risksheet and click on the link column. Type at least 3 characters to trigger the search. You should now see only items matching your query factory filter in the suggestion dropdown, rather than all available items.
See Also
- Use Query Factory — advanced query factory patterns
- Configure Queries — query syntax reference
- Enable Editing of Upstream Columns — making link columns editable
- Consolidate Multiple Link Columns — combining link columns
- Configure Dependent Enums — cascading selection patterns
Sources
Sources
KB Articles
- Dropdown categories for Risksheet
- Enable linking upstream items to the Risk based on a specific condition
- Collect multiple link columns into one column
- Display Sub-columns for multiItemLink columns
- Enable editing of read-only up-stream columns
RiskSheetContextMenu.tsSheetConstants.tsGridUndoStack.tsPolarionAppConfigManager.javaMultiItemLinkEditor.ts