I’m trying to generate a data table using a string that is delimited by space, after using the activity, it shows that I have an excess row/data which is a duplicate of the first row of the data table, how do I fix this?
image below are the current values of the variable and data table while testing.
after getting the datatable from generate datatable the duplicated row can be removed e.g. with Remove Duplicate Rows activity or with a LINQ statement
should work, just try it at least the LINQ could manage it
A cleansing job for triming all ’ could look like this:
Var: dtCleansed | DataType: DataTable
Assign Activity
LHS: dtCleansed
RHS:
(From d in YourDataTableVar.AsEnumerable
Let ra = d.ItemArray.Select(Function (x) x.toString.Trim({"'“c,” "c})).ToArray
Select r = dtCleansed.Rows.Add(ra)).CopyToDataTable
will look into this. I also tried using the activity “Remove Duplicate Rows”
from data tables, the outcome since weird.
after using the Generate Data Table from Text I get 1 row of data but after using the remove duplicates, it made a copy instead