Create Activity for Shuffling elements in a data table

UiPath team should make an activity to shuffle elements in a data table.

that will be really handy to have.

current process is way too much tricky and takes time.

Please do consider my request.

Hi @AdityaShivam!

You can shuffle the rows of a data table using an Invoke Code activity with CSharp language and run this code:

var rand = new Random();
dataTable = dataTable.AsEnumerable().OrderBy(r => rand.Next()).CopyToDataTable();

Cheers @nerlichman

This looks great , However It would be good to have a direct activity in Uipath for this.

For someone who is not aware of c# , Activity will be helpful :slight_smile:

1 Like

Sure, that’s the purpose of this category!

Just wanted to give you an alternative that you can use in the meantime in case you need it.

Cheers! :grinning: