How to convert the data from a DataTable to a List in UiPath

Many times you came across a scenario where you need to take a value from the particular column from a datatable and pass that into a list.

Lets see how we can do this in UiPath

Step 1:- We will first create a DataTable and populate some data into the tables.

Store the DataTable into the output variable of type DataTable . For eg:- DTTable.

Step 2:- Drag an assign activity and use the below mentioned code to achieve the result. I have used Item column to convert it to list.

Step 3:- Drag for each activity to loop through the list MyList and put message box inside it to print the result.

Step 4:- Lets run the workflow.


Nice @Nitya1 !