Sort DataTable
Sort DataTable
Section titled “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.
How it works
Section titled “How it works”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.
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
table | expression | The DataTable to sort. |
column | text | Name of the column to sort by. |
Optional parameters
Section titled “Optional parameters”| Parameter | Editor | Description |
|---|---|---|
direction | list | Sentido: asc (ascendente, def.) · desc (descendente). |
Output
Section titled “Output”Returns a sorted DataTable.
Example
Section titled “Example”Sort invoices by amount, from highest to lowest:
Sort DataTable table = = facturas column = "Total" direction = desc → output: porMontoRelated activities
Section titled “Related activities”- Filter DataTable — filtrar antes de ordenar.
- Group By — agrupar y resumir.