Hi,
I have one excel sheet or datatable, where i want to perform some filter operation on different columns one by one and update other column values as per requirement without loop as it contains more than 50000-70000 data and after filtering all operations it should return original datatable with updated values not filtered datarows i.e. if filtered operation performed on 25000 rows of 60000 datatows then it should return original datatable with updated values not just 25000 rows datatable.
I have one sheet which contains input value and column name i need to filter and output value which needs to update in output column.
Template sheet format:(this will be used in for each row activity)
So i want to check Template sheet and filter inputcoulmn with input value, if any match found then update given output value in column ‘Remarks’ and value “Yes” in Reference column.
Note: Input datatable contains more than 50000-70000 data so i want without looping the input datatable. We only looping template sheet for input values.
Then perform the main operation using this snippet of code->
(From row In dt_masterTable.AsEnumerable()
Let Remark = If(dict.Keys.Any(Function(a) row.ItemArray.Select(Function(s) s.ToString.Trim).Contains(a.ToString.Trim)),
dict(dict.Keys.First(Function(f) row.ItemArray.Select(Function(s) s.ToString.Trim).Contains(f.ToString.Trim)).ToString.Trim).Item2,"")
Let Reference = If(String.IsNullOrEmpty(Remark.ToString),"","Yes")
Let ra = row.ItemArray.Take(4).Concat({Remark,Reference}).ToArray()
Select dt_result.Rows.Add(ra)).CopyToDataTable()
One more problem is there, how Emp Id. Sometimes contains prefix value as E i.e. E1,E2 etc.
How to Remove that prefix and add to same column or new column without loop.