Concat a string for to the existing cell values of a column at once

Hi Team,

How do we Concat a $ for example to the existing cell values of a column at once.
The data is huge.

@MANISHA_V_ARORA - c# or ?

If I give invoke code for will that be ok?

give a try on

  • add a new datacolumn (name dollarvalue) ti the datatable
  • set the expression property: YourDataTableVar.Columns(“dollarvalue”).Expression = “’$’+[ColNameWithValue]”

Input, Output:

In case of origin column is unneeded, we can:

  • remove it e.g. delete datacolumn, filter datatable or dtData.DefaultView…
  • renaming dollarvalue column: dtData.Columns(“dollarvalue”).ColumnName = “OldColName”

have also a look here on how it was done with the url:

1 Like

Yes @prasath17 VB.Net code would do

@MANISHA_V_ARORA - Here you go…

Invoke Code

DtInput.AsEnumerable().ToList().ForEach(Sub (row) row("Amount") = "$" +row("Amount").ToString)

1 Like

Why have you added .tolist()?

@kumar.varun2 - Taking each row and convert it to a list …and then looping each row to do a necessary update…

Sample video here: Updating single / multiple columns using single of code in UiPath - YouTube