tables.sort
Sort table rows by column values, preserving the leading repeating-header prefix unless skipHeaderRows specifies an exact override. Repetition flags and styling remain attached to their rows. Collaborative sessions reject structural table rewrites without mutation.
doc.tables.sort(…)Expected result
Returns a TableMutationResult receipt confirming rows were reordered.
Inputs
targetTableAddressconditionally requiredFields
kind"block"requirednodeType"table"requirednodeIdstringrequirednodeIdstringconditionally requiredkeysobject[]requiredAt least one sort key is required.
1 additional input field
skipHeaderRowsintegerExclude exactly this many leading rows, overriding automatic detection even when smaller than the repeating-header prefix. Omit to preserve the contiguous prefix of enabled repeating-header rows. Zero sorts all rows; the row count is a no-op; a larger count returns a nonmutating INVALID_TARGET failure receipt. Malformed counts throw INVALID_ARGUMENT before the adapter. Repetition flags and styling remain unchanged.
Result
Output fields
true
successtruerequiredappliedChangeMode"direct" | "tracked"tableTableAddressFields
kind"block"requirednodeType"table"requirednodeIdstringrequiredtrackedChangeRefsEntityAddress[]false
successfalserequiredfailureobjectrequiredFields
code"NO_OP" | "INVALID_TARGET" | "TARGET_NOT_FOUND" | "CAPABILITY_UNAVAILABLE"requiredmessagestringrequireddetailsunknownFailures
Pre-apply throws
TARGET_NOT_FOUNDINVALID_TARGETCAPABILITY_UNAVAILABLE
1 more codes
INVALID_ARGUMENT
Non-applied receipt codes
INVALID_TARGET
Raw schemas
Open the generated JSON artifact for the exact input, output, success, and failure schemas represented by this contract version.
View raw JSON schemas