I want to keep only the numerical digits after the rpa operation. The numeric is dynamic so I want to remove the last two alphabets of the string.
How can I do it?
Expected output
I want to keep only the numerical digits after the rpa operation. The numeric is dynamic so I want to remove the last two alphabets of the string.
How can I do it?
Expected output
@Tanzill_Ahsan - In the For Each DataTable …please try the below.
Row("Balance") = Row("Balance").replace("Dr").tosting
through an assign activity?
Yes…Through Assign activity
Hi @Tanzill_Ahsan
you can try the regex way of doing it in assign activity
row(“Balance”)= System.Text.RegularExpressions.Regex.Match(row(“Balance”).ToString,“[\d.,]+”).Value.ToString
Regards,
Nived N
Happy Automation
thank you
Hi @prasath17
I think yes , we require that it seems
I think I didn’t consider the , in my input data
Let me correct in my response
Thank you @prasath17 for correcting mistake
this is not working because of COMMA, but if I remove the comma then it working fine
@Tanzill_Ahsan - Apologize for the incorrect code shared…please try as below…
If you also get Cr for Credit then the above code won’t work…so you have add another replace like below…or you can try @NIVED_NAMBIAR solution too…
CurrentRow("Balance").ToString.Replace("Dr",string.Empty).Replace("Cr",string.Empty)
His solution is not working while the string contains a comma
@prasath17 I will check his corrected code but how can I remove the comma from the string after removing Dr and Cr?
Thanks, your current command is working
@Tanzill_Ahsan - Just add another .replace in the same code,
CurrentRow("Balance").ToString.Replace("Dr",string.Empty).Replace("Cr",string.Empty).replace(",",string.empty)
@Tanzill_Ahsan - just another hint…
After writing the output , you will see below Ignore error like this…
If you like to ignore that, convert your output to double as shown below…
Cdbl(CurrentRow("Balance").ToString.Replace("Dr",string.Empty).Replace("Cr",string.Empty).Replace(",",string.empty))
this is a really great help but I don’t know why this is not printing the result if I am using a readcell activity
While I am using read cell activity the output is not showing and there is no error. Why this is happening?
This is not working for each loop. If I am using read cell activity, this is not showing any result.
How may I solve this problem?