If contains something from the list

Hi, I am trying to do a robot to rpachallenge.com movie search challenge and I want to have a list with some words and use this condition: if the text I extracted with the review(it is a string variable) contains any of these words(i don’t know for sure where I put these words)

How can I make a condition like that?
I just manage to do like this:
Review.Contains(“Good”) or Review.Contains(“Incredible”) or etc…
but It will be a long list to do like that…

Thanks for the help!

1 Like

where do you have those list??
@Alamyr_Junior

I am trying to put inside a variable list of string but I can store in other place if it is the case…

@Alamyr_Junior
give a try on using an assign activity
left side: FoundWords (Datatype: List(Of String)
right Side: yourWordsList.Where(Function (x) YourTextVar.Contains(x)).toList

And you can retrieve all found words in the FoundWords List

1 Like

But I need to use it as a condition in a If activity.

@Alamyr_Junior
yourWordsList.Any(Function (x) YourTextVar.Contains(x))

will return True if one or more SearchWords from the List are found in the Text

1 Like