Override new data into Datatable coulmn

Hi I have Datatable Data with (Dt1)
col1 col2
open ABC
Close BCD
open DEF

I wnated to override col1 value with Closed if col1 value is with open in samedatatble(Dt1)
How can we achive it

Note:Need to update in same datatable(Dt1)

1 Like

Kindly follow the below steps that could help you resolve this
— hope you are ready with the datatable
— use a for each row loop and pass the above datatable variable as input
— inside the loop use a if activity with condition like
row(“yourcolumnname “).Tostring.Equals(“open”)
If the above condition passes It will go to THEN part where include a assign activity like
row(“yourcolumnname “)=“Closed”

Cheers @Prad

How to use this row(“yourcolumnname “)=“Closed” in assign activity?

Mention the columnname as per your excel or if you don’t know the column name but still you can mention the column index which will start from 0 for the first column
Cheers @Prad

Hi @Prad,
1.Keep row(“yourcolumnname “) in the To part of assign activity.
2.Keep “Closed” in the value part of assign activity.

so any issues still to be discussed
Cheers @Prad

Thanks Palaniyappan and Vashisht

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.