Skip to content

Sort DataTable

Type: sort-datatable  ·  Package: DataTable Activities v1.0.0  ·  Output: DataTable

Sorts a DataTable by a column and returns a sorted new table. Useful for presenting data in a logical order (by date, by amount), processing the most urgent first, or preparing a report.

Reorders the rows according to the values of the indicated column, ascending (asc, by default) or descending (desc). Returns a new table; the original does not change.

ParameterEditorDescription
tableexpressionThe DataTable to sort.
columntextName of the column to sort by.
ParameterEditorDescription
directionlistSentido: asc (ascendente, def.) · desc (descendente).

Returns a sorted DataTable.

Sort invoices by amount, from highest to lowest:

Sort DataTable table = = facturas column = "Total" direction = desc → output: porMonto