Sort

This activity can be used to sort the column’s value of the table in ascending or descending order.

Technical Reference:

 

 

 

 INPUT

Column Name: You need to specify the column name from the table within the double quotes.

SortAs: Select the order from the drop-down.

Ascending: This sorts the order from smallest to biggest according to the values.

Descending: This sorts the order from biggest to smallest according to the values.

Table: Enter the datable variable where you want to sort the columns.

 

 

 

 

MISC

Display Name: Displays the name of the activity. You can also customize the activity name to help troubleshoot issues faster. This name will be used for logging purposes

SkipOnError: It specifies whether to continue executing the workflow even if it throws an error. This supports only Boolean value “True or False”

True: Continues to execute the workflow irrespective of any error thrown.

False: Stops the workflow if it throws any error

Version: It specifies the version of the Datatable automation feature in use.

 

OUTPUT

Result: Declare and assign a variable to return the success rate of Skip on error functionality.

SortDt: Declare and assign a variable to return the sorted datatable.

 

Example:

Here we are going to explain how to sort the columns from the table.

To build the automation process,

1.    Drag and drop the Sort activity to the workflow.

2.    Connect it below to the Generate table activity.

3.    Enter the column’s name “Name” in the properties panel.

4.    Select the Sort order as Ascending from the drop-down.

5.    Enter the datatable variable “Sample” in the table from the properties panel.

6.    Declare and assign a variable in the SortDt from the properties panel as “Final_table”.

7.    Add a table viewer activity and connect it below the sort activity.

8.    Enter the sorted datatable variable and title in the properties panel.

9.    Now, execute the workflow.

The bot will identify the table and sort the specified column from the table and then returns the table.