Hi @kavya.s16 ,
Use Filterdatatable activity to filter out columns->select contains in it for your specific words.-> output a DT from it if Dt.rows.count >0 then you can send a mail.
Thanks
Hi @kavya.s16 welcome to community
You can perform this using Linq query
Please find the expression below
Use this in IF condition
(From r In DT Where r(your column name).toString.contains(“gec”)Select r).Count>0
DT in the above expression says Datatable Name so please change accordingly , also column name (please enter your column name)
So if count is greater than zero send a mail
Hi
Let’s make it in a simple method of using AsEnumerable if you have a datatable named dt
Use a IF activity like this with a condition
dt.AsEnumerable().Where(Function(a) a.Field(of String)(“yourcolumnname”).ToString.ToUpper.Contains(“MD/GEC”) OR a.Field(of String)(“yourcolumnname”).ToString.ToUpper.Contains(“GEC”)).CopyToDatatable().Rows.Count > 0
If it’s true it goes to THEN block which means there are records with those texts
So send mail to one mail I’d
Or goes to ELSE block where send to another mail I’d
Cheers @kavya.s16
If you need to check multiple conditions to filter. I would use array (or if you don’t know exact size use List) and filter
arrayVar = {“GEC”,“MD/GEC”}
in If activity = (From r In dt.AsEnumerable
Where arrayVar.Any(Function (x) r(“your column name”).ToString.ToUpper.Equals(x.ToUpper))
Select r).Count > 0
it’s easier to maintain in the future as well.
Hope that helps