I wish I knew how to sort a datatable, but I just don't see it. As a workaround inside of PAD, I am thinking of extract a column, because you can sort a %List% variable. Sort the list, and then do a for each on the list to create a new datatable, like this:
- For each %CurrentItem% in %List%
- For Each %CurrentItem2% in %OldDataTable%
- If %CurrentItem2[3]% = %CurrentItem% #where Column 3 is the wanted column
- Add Item %CurrentItem2% to %NewDataTable%
- EndIF
- End #For Each
- End #For Each
It's a stupid workaround, but without a sort option on the datatable, I don't know how else you would do it. It's just re-writing the datatable in the right order.