I am quite new to UiPath so please forgive my newbie question.
I have a datatable read into memory.
I want to count the amount of time the word CURRENT appears in the STATUS column and
ASSOCIATETYPE = FED
I can look for CURRENT in STATUS using the code below but I would like to do something like an AND statement… Maybe and IF CURRENT and FED then increment the counter.
dt.AsEnumerable().Where(Function(a) a(“STATUS”).ToString.ToUpper.Trim.Equals(“CURRENT”)).ToArray.Count
THE DATA IS LIKE THIS…
ASSOCIATE TYPE … STATUS
… …
CTR CURRENT
FED CURRENT
FED CURRENT
FED RETIRED
Hi Ushu,
Thank you for the proposed solution. I am hoping to avoid looping through my whole spreadsheet as it has about 30 columns and 58,000 records. My end goal to this effort is to end up with a summary list of the STATUS, ASSOCIATE TYPES, and Count. Then I want to append a excel worksheet. For now though I am trying to figure out how to quickly pull my number based on a couple of fields. It would be easy in Access or other databases. I am new though to UiPath.
(From r In dt.Select() Where
r (“ASSOCIATE TYPE”).ToString.ToUpper.trim.Equals(“FED”) AndAlso
r (“STATUS”).ToString.ToUpper.Trim.Equals(“CURRENT”)
Select r).toarray.Count