Dear @aksh1yadav and @Mr_JDavey
I want to delete the row where Variable match is found
tried below following by for each loop and Remove Activity, if I pass value manually it is working fine but not working with variable, please help
It will just create a new datatable with results where no match will be there. so you can use that datatable for your further operation.
if you wanna delete rows then there is post already exist by me, so search it
Hi @aksh1yadav , yes I had followed the post from you on 26 Oct above in this trail.
It has given the required result but if output file name is change , I need the result in same file as it has to be used for rest of policies, please check below and guide
@aksh1yadav … Please can you suggest something for below scenario.
I have data in two data tables DT1 and DT2 . I want to delete data from DT1 if dt1.empid = dt2.contractorid .
I have taken two for loop and in inner for loop I have if condition with this check(dt1.empid = dt2.contractorid).
but its not workign, throwing exception.
If you will read all post in this thread above you can get your approach and idea.
you can instead of delete much rows take only those data which is needful for next step so just check your idea from above existing post and get the actual context and if still face any prob let me know.
Solution Without Usign for each:
Datatable result = DT1.AsEnumerable().Where(function(row) Not DT2.AsEnumerable().Select(function(r) r.Field(Of Int32)("Contractorid")).Any(function(x) x = row.Field(Of Int32)("empid"))).CopyToDataTable()