Concatenate column value with existing column

Hi,
i have a data table DT with a columname (“Remarks”) now i want to check if the column already has a value in it i just want to concatenate it with the new data if not just assign the current data

if Dt.Remarks.length>0

then
“already existing value”+";"+CurrentRow(“Remarks”).tostring
else
CurrentRow(“Remarks”).tostring

Please help.
Thanks

You already have it correct. What’s the problem?

Hi @postwick thanks for the reply.

The problem is when i do assigning the Then part, if the column already contains the data won’t it get replaced instead of concatenating?

Yes it gets replaced with the value you want.

Assign CurrentRow(“Remarks”) = CurrentRow(“Remarks”).ToString + “; some text I want to add”

If Remarks was currently “I like it” then the above assign sets the value of Remarks to “I like it; some text I want to add”

@Muthulakshmi_Thangamuthu,

Can you please try below one?

For each row in DT {
if Not String.IsNullOrEmpty(row(“Remarks”).tostring){
abc+""+row(“Remarks”).tostring
}Else {
row(“Remarks”).tostring
}
}

I’m not sure why you’re giving me code.

Fill in the Assign activities with what you want the Remarks column set to.

image

1 Like

Hi @Pankaj.Patil !
I don’t see also where it could go wrong. Do you mind sending us your workflow (xaml file) ? @Muthulakshmi_Thangamuthu

@Hiba_B,

sure, please send both files xaml as well as excel with dummy data, so i could try as is