Sort Data Table randomly

Hi community!
I want to sort a Data Table randomly, I mean, I want my DT in different order every time I run the process.
Is there any activity or property to sort randomly?


You can use the sort datatable activity .
have a look on this thread->


How about the following?

rnd = new Random()

dt = dt.AsEnumerable.OrderBy(Function(r) rnd.NextDouble).CopyToDataTable

Note: it mgiht be needed to input proper random seed to random instance.


1 Like

you can use sort table activity and there are two options are there you can sort by ascending or descending

Perfect! Thanks a lot!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.