I approached with the following steps:
- Load the csv in to UiPath (as a DataTable)
- Filter for “Status” = “Fail”
- Get a list of the “OEM” in this filter
- Join all results together to insert in to a sentence
With the following you can use some LINQ to query for “Fail” statuses and save the resulting OEM values to a List(Of String):
List(Of String) = dt.AsEnumerable.Where(Function(rows) rows.Field(Of String)("Status") = "Fail").Select(Function(rows) rows.Field(Of String)("OEM")).Distinct.ToList
Note I have added a “.Distinct” to avoid duplicates. You may want to remove this depending on your use case.
Look at String.Join to include the results in your email body.
Please also consider replacing hard coded column names with config values