I want to check if "Message text" column has few keywords like terminated or blocked? If anyone can help?

image

on datarow level:

{“TERMINATED”,“BLOCKED”}.Any(Function (x) YourDataRowVar(“Message text”).toString.ToUpper.Contains(s))

will return true or false when keyword was found

1 Like

use for each row then use if activity with row(“Message text”).ToString.contains(“blocked”).contains(“terminated”)

1 Like

on datatable level:

YourDataTableVar.AsEnumerable.Any(Function (d) {"TERMINATED","BLOCKED"}.Any(Function (x) d("Message text").toString.ToUpper.Contains(x)))
2 Likes

image
It’s giving issue attached in image

Can u explain what is s here?

i updated the statement above. x instead of s was needed

d,x… are like local variables within the LINQ

[HowTo] LINQ (VB.Net) Learning Catalogue - Help / Something Else - UiPath Community Forum

1 Like

@anjasing Do you want to check whether entire excel contains terminated or blocked? or do you want the row details also?

If you just want to find terminated or blocked, you can use output datatable actiivity to convert datatable to string and then use Yourstringvariable.ToString.Contains(“Text to check”)

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.