Replace a value in a data table column with another value

Hey Everyone,

Name Status
ABC 0
ZYZ 0
BCD 1
DSE 0
XYZ 1
BCA 0

In the above data table, In the status column, I want to replace all “1” to “True”.
Any suggestions would be helpful :slight_smile:

Thanks

Hi @Techno1

Loop the DataTable,
place an if condition currentRow(“Status”).toString.Trim.Equals(“1”)
then currentRow(“Status”)=“True” else currentRow(“Status”)=“False”

ere is the screenshot of workflow i used

I want to replace it in a way that the updated values add into a new data table

The logic that we told would modify the status column in the same datatable
for 1, it will change it to true, else it will set it false.

Create a copy of your datatable before the above suggested by adil, then you can chnage it directly in the new table. (dt.Copy)

Thanks.