Rhys18
(Rizky Albert Hartono)
July 13, 2022, 10:44am
1
Hi,
I have an activity to remove a rows but based on inputted customer ID from excel. In order to do this, it need to read the excel then save it to datatable, and should the data table converted to string in order to delete it? If no, then how to delete it? Does it have to be done with looping or with a string? Here’s an example in excel :
@Rhys18
Have a look on this thread->
Veera_Raj
(Veeraraj Sethuraman)
July 13, 2022, 10:49am
3
step 1 read the first table DT1
step2 read the second table DT2
for each row(dt2) activity and inside for each row use filter table
for filter table input is dt1
configure the column name and value of filtter should be row(cutomerid).tostring
hey,
you can use merge Data table
where you can keep output of of First Data Table as DT1 and DT2 as destination of
Second Data table.
Thanks
Hi @Rhys18 ,
Could you Check the below Linq Expression :
CurrentDT.AsEnumerable.Where(Function(x)Not(DT_List.AsEnumerable.any(Function(y)y("Customer_ID").ToString.Equals(x("Customer_ID").ToString)))).CopyToDataTable
Rhys18
(Rizky Albert Hartono)
July 14, 2022, 3:19am
6
Tried it and it throw me “source contains no datarows” :
I even added .Trim after .ToString and it still says no datarows
Rhys18
(Rizky Albert Hartono)
July 14, 2022, 3:21am
7
Thanks for the help ! Will learn this in paralel
Rhys18
(Rizky Albert Hartono)
July 14, 2022, 3:31am
8
Thank you ! Tried this and it works