Sometimes while working with DataTable, we might want to add new data to our existing DataTable.
Let’s see how to do that!!!
Implementation using UiPath :
Drag “Build Datatable” activity into the designer panel, to build our sample DataTable ans save the output into a variable called dt_sample.
Drag “Add Data Row” activity into the designer panel, and pass the values into it as shown in the figure below.
Because in the existing datatable that we have with us, there are only two columns.
This is how we have to pass the values into it using the activity’s properties.
Drag “Output Data Table” activity into the designer panel, and pass the above final modified datatable “dt_sample to it(The only purpose of “Output Data Table” activity here is to convert the datatable content into string type, So that it can be displayed on the screen using a message box).
Use “Message Box” activity to display the updated Data Table.
Finally, execute the workflow and observe the output carefully 🙂
Hope it has helped you…