UiPath Documentation
activities
latest
false
Workflow activities

SortDataTable

Sorts an entire DataTable by ascending or descending order, based on the values of a specified column.

Sorts an entire DataTable by ascending or descending order, based on the values of a specified column.

Definition​

Namespace: UiPath.Activities.System.API

Assembly: UiPath.System.Activities.Api (in UiPath.System.Activities.Api.dll)

Overloads​

SortDataTable(DataTable, String)Sorts an entire DataTable by ascending or descending order, based on the values of a specified column.
SortDataTable(DataTable, String, SortOrder)Sorts an entire DataTable by ascending or descending order, based on the values of a specified column, while specifying the order in which the table should be sorted.

SortDataTable(DataTable, String)​

Sorts an entire DataTable by ascending or descending order, based on the values of a specified column.

DataTable SortDataTable(
    DataTable dataTable,
    string columnName
)
DataTable SortDataTable(
    DataTable dataTable,
    string columnName
)

dataTable DataTable : The DataTable variable you want to sort.

columnName String : The variable containing the name of the column you want to sort by.

SortDataTable(DataTable, String, SortOrder)​

Sorts an entire DataTable by ascending or descending order, based on the values of a specified column, while specifying the order in which the table should be sorted.

DataTable SortDataTable(
    DataTable dataTable,
    string columnName,
    SortOrder sortOrder
)
DataTable SortDataTable(
    DataTable dataTable,
    string columnName,
    SortOrder sortOrder
)

dataTable DataTable : The DataTable variable you want to sort.

columnName String : The variable containing the name of the column you want to sort by.

sortOrder SortOrder : The order in which the table is to be sorted.

Return value​

The DataTable variable after it has been sorted.

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated