Compare Strings in UIPAth

Hi All,

How to compare multiple strings in contains or any other method in UIPath studio.

I need to compare the below scenario in my scenario,

f the City does NOT belong to the group {““Koln””, ““Lyon””, ““Torino””, ““Rimini””, ““Brasov””} , this should be categorized as the second Business Rule Exception . We can only process requests from these cities. Check the City value extracted after the individual Tax ID search;

Thanks,
Bala

1 Like

yourStringVariable.Contains(“City”)

Hi
We can check with these values if the main string is stored in a string variable named strinput and if this list is stored in a variable named list_str

Use a condition in a IF activity
list_str.Contains(strinput.ToString)

If true it will go to THEN part or to ELSE part

Cheers @Bala_Murugan_Kothand