Lets say I need to sort my dataTable (made from a Excel document) by 3 columns, lets name them:
ID (not unique)
Age
Money
so first, I will sort by ID, then age and then money, without losing the past sorting.
any idea how to make it in UiPath?
Lets say I need to sort my dataTable (made from a Excel document) by 3 columns, lets name them:
ID (not unique)
Age
Money
so first, I will sort by ID, then age and then money, without losing the past sorting.
any idea how to make it in UiPath?
use Sort Data Table activity to sort the DataTable.
using 3 back to back will keep the past sorting? and I forgot to mention, but the ID column is actually a text column in Excel, so I must also force Excel to treat them as number before sorting
Hi @MaxyArthes
Fine as you mentioned three consecutive sort datatable activity will keep the previous sorting madeā¦So that would work for sure buddy.
Then ID column though being text format it will get sorted out as well.
Kindly try this and let know for any queries or clarification
You were almost done
Cheers @MaxyArthes
(From x In datatablevariable.AsEnumerable() Order By convert.ToInt16(x(āIDā)),convert.ToString(x(āAgeā)),convert.ToString(x(āMoneyā)) Select x).CopyToDataTable
The ID column donāt get sorted, probably because its strings =/
Ohā¦! does that column with string contains any special character in it buddy
Cheers @MaxyArthes
Using āInvoke Codeā ? Getting a syntax error so I might just not be using the good activitie
Using Assign Activity
Had to switch int16 to int32, working perfectly, thanks you
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
Hi all,
Here is the solution without using datatable, can able to do the multiple sorting.
Thank you
Balamurugan.S