sortBy Properties
Property Type Default Description sortByarray []Array of sort definitions applied in order. The first entry is the primary sort; subsequent entries break ties. sortBy[].columnIdstring None (required) Dot-separated binding path to the column that should be sorted. Must match a column key defined in the columns section.sortBy[].directionstring "asc"(optional) Sort direction. Supported values: "asc" (ascending), "desc" (descending).
Sort Behavior
Behavior Description Client-side Sorting is applied in the browser after data is loaded Multi-column Multiple sort entries are supported; order in the array determines priority Default direction If direction is omitted, "asc" is used Interactive override Users can click column headers to change sort direction at runtime Default sort persistence The configured sortBy is always re-applied as a secondary sort after user-initiated sorts to maintain hierarchical stability
Sort Flow
Basic Sort
Sort by a single column in ascending order:
sortBy :
- columnId : outlineNumber
direction : asc
Multi-Column Sort
Sort by primary column, then by secondary column for rows with equal primary values:
sortBy :
- columnId : outlineNumber
direction : asc
- columnId : title
direction : asc
Descending Sort
sortBy :
- columnId : severity
direction : desc
Column-Level Sort
Individual columns can also specify a default sort direction via the sort column property. This is applied in addition to the global sortBy configuration.
Property Type Default Description columns.*.sortstring None Default sort direction for this specific column. Values: "asc", "desc".
columns :
outlineNumber :
title : "#"
width : 80
sort : asc
Use the top-level sortBy for the primary sheet sort order. Use the column-level sort property when a specific column should always maintain a particular direction as a secondary sort criterion.
Interactive Sort
Users can sort interactively in the sheet:
Action Result Click column header sort icon Sort by that column (toggles ascending/descending) Ctrl+Click column headerAdd column to existing multi-column sort Reset sort (toolbar) Remove user-applied sorts and restore sortBy default
Sort state indicators appear in column headers showing the current sort direction. Multi-column sort shows small numbers indicating sort priority.
Sort Type Behavior
Column Type Sort Behavior Text (string) Alphabetical sort Enum Sort by enum value sequence, not alphabetically Reference Sort by display value of the referenced entity Workflow Sort by transition display text Custom render Sort by the rendered display value
Complete YAML Example
sortBy :
- columnId : outlineNumber
direction : asc
columns :
outlineNumber :
title : "#"
width : 80
sort : asc
title :
title : User Need
width : 200
hasFocus : true
systemRequirements.systemRequirement.title :
title : System Requirement
width : 180
columnGroup : sysReq
systemRequirements.systemRequirement.severity :
title : Severity
width : 100
columnGroup : sysReq
columnGroups :
sysReq :
groupName : System Requirements
groupStyle : darkblue
headerStyle : blue
collapseTo : systemRequirements.systemRequirement.title
sources :
- id : main
title : RTM
model : rtm
query :
from : UserNeed
where : <WHERE>
expand :
- name : systemRequirements
title : System Requirements
Related Pages
Source references: sortBy Configuration Guide KB article, powersheet.yaml, whole_rtm.template.yaml, sorting.spec.ts
KB Articles Source Code
prod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/configurations/whole_rtm.template.yaml
prod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/configurations/mip_undo_redo.template.yaml
prod-powersheet-src/com.nextedy.powersheet.client/ltc-repo/cypress/e2e/Sheet/reference.spec.ts
prod-powersheet-src/com.nextedy.powersheet.client/ltc-repo/cypress/e2e/Sheet/sorting.spec.ts
powersheet.yaml