Can you try this:
System.Text.RegularExpressions.Regex.Replace(row(“Address”).ToString.ToUpper,”[2]+“,”").ToString.Trim
Thanks @Saranyajk for your efforts,
Input
Output I need :
I want “THOR” and “thor” to be deleted only at the first place, But with your workflow “THOR” and “thor” are deleting everywhere
ok, you can split to string, check if first place is Thor, then delete
what about at the end, you want thor or not?
Yes I want it at the end or anywhere else , I want it to be deleted only if it is at starting
Thanks @suraj3501, I tried it…but not getting expected output
@Saranyajk Thanks for the work you have done for me…I tried your process…I am not getting the expected output
can you show your work please
Yeah, Once check this workflow
Process4.zip (2.3 KB)
Main_Forum.xaml (99.4 KB)
IF condition is true, you have to use the replace activity, thats why
@Saranyajk Now I changed this as you said and I also saw your workflow,but still facing same problem.Once see this and tell me if any changes are there in this workflow
Process4.zip (2.4 KB)
yes ofcourse, you need to write the new address in your datatable, and then write the datatable otherwise the values in datatable, dont change. for that assign row("address)=new_Address
@Saranyajk You mean I need to add New Address Column in the excel? or I need to add WriteLine activity and specify the new address datatable
you need to add this assign, otherwise Datatable will not be updated
first modify the database value and then write to EXCEL
@Saranyajk Thank you…Now the first string got deleted everywhere but I kept “THOR” in middle…that one also got deleted
Input
Output I got
In 5th and 6th rows I kept “THOR” in middle of text…That one got deleted but as per the code that should not delete because we mentioned that only first place must delete if it contains “THOR”/“thor”
@Saranyajk Can you please check if anything is wrong
Process4.zip (2.5 KB)