Add Array to Datatable

I have a list of string and I want to add it at the top of a datatable, means at index 0. How can I do this?

Hi @Rajat_Hedaoo ,

Could you maybe try Checking the post below :

Hey

you can add your array like this
image

yourList.Select(Function(n) cobj(n)).ToArray()

and then swap your row position with this

Regards

Hi @supermanPunch,

How to convert list of string to DataRow object for passing as argument in the invoke method activity which you have used?

Thanks,
Rajat

@Rajat_Hedaoo ,
Apologies. It seems the workflow only adds an Empty row in the datatable at the required position.

We could add the data by creating a new DataRow variable and assigning the list value to it and then performing the setting up of the row in the first position.

Check the updated workflow below :
invoke.zip (2.8 KB)