Configure Default Sort Order
Add a top-levelsortBy array to the sheet configuration. The array contains column ID strings in priority sequence:
Sort Descending
Prefix a column ID with~ (tilde) to sort that column in descending order:
Sort by Outline Number
To maintain the same item order as in the Polarion LiveDoc, sort by outline number. Because outline numbers sort lexicographically by default (1.10 before 1.2), you need a server-rendered column that zero-pads each segment.
Step 1 — Add a hidden server-rendered column that formats the outline number:
Interactive Sorting
Users can sort columns at runtime by clicking column headers:- Single click on a column header sorts ascending
- Click again on the same header to switch to descending
- Ctrl+Click (Windows/Linux) or Cmd+Click (macOS) adds the column as a secondary sort criterion without clearing the existing sort
Sorting Behavior by Column Type
Risksheet applies specialized sorting logic automatically based on column type:Sort behavior for custom
serverRender columns depends on the rendered output format. Test sorting after adding server-rendered columns.Comparison Mode Constraints
When comparing to a baseline, Risksheet enforces specific sorting rules:- The grid automatically sorts by Item ID then Revision number — this cannot be overridden
- Task and downstream columns cannot be sorted in comparison mode
- Sorting operates on baseline snapshot values rather than current values (except for system identity fields like
systemItemIdandsystemItemRevision)
Automatic Behaviors
Risksheet handles several sorting details automatically:- Pending edits are saved before sorting occurs — you will not lose unsaved changes when clicking a header
- Client-side execution — sorting, filtering, and pagination happen in the browser without server round-trips, providing immediate visual feedback
- Unsaved items (prefixed with
*) sort with the asterisk intact, keeping newly created items visible
URL Parameter for Sorting
You can also drive sorting via thesort URL parameter, which uses the same syntax as sortBy (comma-separated column IDs, with ~ prefix for descending):
Verify
After configuringsortBy, reload the Risksheet page. The grid should display rows in the specified order on initial load. Click column headers to confirm interactive sorting works and verify that Ctrl/Cmd+Click enables multi-column sorting.
See Also
- Add a Basic Column — column property reference including
idandbindings - Display Sub-Columns — nested column configuration
- Control Column Visibility — show or hide columns
- Create Saved Views — save different column and sort arrangements