Linq to Extract a required value

in general it is a filter task which we can do with essential or with the LINQ Where operator

Assign Activity:
myRow | DataRow =

dtData.AsEnumerable.Where(Function (x) x("Type").toString.Trim.Equals("O")).FirstOrDefault()

if myRow is not null (as it was found) we use
myRow(“Created”).toString eg. to get the value

UPD1 -

  • maybe the extraction into a dict will better serve later for the access and would be possible
  • when it can happen that the data does have more O rows, then we would adapt the LINQ as well

UPD2:
for learning have a look here:

1 Like