Filter expression in data row

@BOTFORCE Actually there is an additional Step involved in it, Which I believe I have not said. When the CollectedDataDT has no rows Corresponding to entry_id which is matching in Other DT , it gives out an Error.

There are mainly two ways of Handling that error:

  1. You can use a Try Catch Method, Where you enclose the Assign Statement in Try and use another assign Statement in Catch Block to assign an Empty Datatable. You can perform thsi as shown in the Screenshots below
    dtarray
    dtarray1

  2. The Other method is to use an Array of DataRow variable. You can Declare an Array of DataRow variable, say dtRow_array. Instead of the Query above you can use this Query :

dtRow_Array = CollectedDataDT.AsEnumerable().Where(function(row) Not joinEntIDDT.AsEnumerable().Select(function(x) x(“entry_id”).ToString).Any(function(y) y = row(“entry_id”).ToString)).ToArray

Then Implement as Shown in the Below Screenshots:


1 Like