I have a Data table in UiPath where it has a few columns each containing data. I want to add another column to this Data table and concatenate some of the fields to make a unique string. I’m quite lost with what steps I should be taking to achieve the result. An example of the Data table and the outcome that I wish to receive are below.
Example of Datatable before
Col1 Col2 Col3 Col4 Col5
AT 125 08 STA DA
AT 536 07 VBA AR
Example of Datatable after
Col1 Col2 Col3 Col4 Col5 Col6
AT 125 08 STA DA 12508STADA
AT 536 07 VBA AR 53607VBAAR
EDIT:
I have been able to do the following:
Use a “Add Data Column” activity to make a new blank row
Use a “For Each Row” activity with an assign activity inside to assign the value to the new column with the column values that i wish to concatenate.
My question now is there any better way to achieve this result?
You don’t need an Excel Application Scope activity to achieve this, you might just use Microsoft dotnet Language Integrated Query (LINQ) and use the assign activity to directly concat the two (or more!) fields within your ForEach Row activity: