Check data table has particular value or not

Hello,

My scenario is that bot is filtering tickets and storing them in data table. After that bot is further filtering that data table with 3 types of role name. Then only it will proceed. I am using the below expression to check this but it is not working -
dt.AsEnumerable().Any(Function(x)x(“ColumnName”).ToString = “Value1”) Or dt.AsEnumerable().Any(Function(x)x(“ColumnName”).ToString = “Value2”) Or dt.AsEnumerable().Any(Function(x)x(“ColumnName”).ToString = “Value3”)

Please help me in resolving this.

Thank you.

@mannu.1996.08
give a try on following:
grafik

dtData.AsEnumerable.Any(Function (x) {"Value1","Value2","Value3"}.Contains(x("Column1").toString.Trim))

testing the opposite case:
grafik

2 Likes

Hey use my activity for this :smiley:

sure. I will give a try on this .Thank you @ppr .

Sure. I will check this one. Thank you @ Mikolaj_Zielinski

i tried your expression . It is working . Thank you @ppr

as i tried with the normal data table expression provided above and it worked so i couldn’t try your activity this time. Thank you @Mikolaj_Zielinski .