Hello All,
we want to keep first 80 characters of data in a column and trim rest of character. Kindly provide Logical query for same
@Ripusudan_Sharma
iterate over the datatable with a for each row activity
use an assign activity
leftside: row(YourColNameOrIndex)
right side: new String(row(YourColNameOrIndex).toString.Take(80).toArray)
in case of your string is shorter then 80 chars the statement will work and not fail instead of using substring method on a string having less then 80 chars
Please check the workflow
process1.zip (605.0 KB)
I had made the workflow to trim upto 10 characters.
You can make change in that by replacing the code in invoke code as follows
dt1.AsEnumerable().ToList.ForEach(Sub(row) row(“Number”)=row(ColumnName).ToString.SubString(0,80))
Hope it helps you
Mark it as solution if it resolves ur query
Regards
Nived N
Happy Automation
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.