How to compare an array of string with another string variable?


#1

I have an array of string. I have to see if it contains another string variable and if it does display it on output screen. How do I do this?


#2

in the if condition use can use this:
arrayvariable.Contains(StringVariable)
In then part do whatever you wish to do :slight_smile:
Here is a workflow:
ArrayCompare.xaml (5.4 KB)
Did this helped you?


#3

Thank you. This is working for me. Just a query, if arrayvariable contains only some part of StringVariable(i.e. not exactly same) will it still return true?


#4

Then you can use StringVariable.Contains() function! That will work in this case :slight_smile:
And please don’t mark your reply as solution! Someone having the same issue will have problems :slight_smile:
Regards,

Niket Ghai