How to make If statement more compact in UiPath

0 votes
I have a condition like City="Delhi" Or City="Pune" Or City="New York" or City="London", where I want to check if City is equal to any one of these names. But how can I compact this condition in If statement, as I don't want to use nested loops. Please suggest how to do that using UiPath.
Mar 18, 2019 in RPA by Sanjiv
5,440 views
I have already tried using OR in between the conditions in If statement, but that doesn't work.

1 answer to this question.

0 votes

Hey @Sanjiv, if you wish to compact a condition like this in If statement using UiPath, you can define a list of strings with your values like (Cities: {"Delhi", "Pune", "New York", "London"}) and use .Contains function of lists in If statement. For eg. Cities.Contains("Delhi") will return true as it is present in the list. Refer to the screenshot for understanding better:

answered Mar 18, 2019 by Anvi
• 14,150 points

Related Questions In RPA

0 votes
1 answer

How to get the desired packages in UiPath Studio if not available in Package Manager?

Steps to get your desired package in ...READ MORE

answered Oct 15, 2019 in RPA by Abha
• 28,140 points
2,320 views
0 votes
1 answer

How to make a text hyperlink in word using Uipath Studio?

Hi there, you can make a text ...READ MORE

answered Oct 24, 2019 in RPA by Abha
• 28,140 points
3,714 views
0 votes
1 answer

How to use Not contains function in string in UIPath?

you can use the following approach  strValue = ...READ MORE

answered May 16, 2018 in RPA by wrecker
• 3,110 points
4,539 views
0 votes
1 answer

How to select an item in UiPath that starts with a string

use a wildcard in selector. make sure that ...READ MORE

answered May 21, 2018 in RPA by wrecker
• 3,110 points
3,201 views
0 votes
1 answer

Identify a Column in a database in UiPath Studio

There are two options to identify a ...READ MORE

answered Feb 12, 2019 in RPA by Sahiti
• 6,370 points
2,497 views
0 votes
1 answer

Which edition of UiPath is more suitable for individual use, Enterprise Platform or Community Edition? Why?

UiPath’s Community Edition (CE) is the version which is ...READ MORE

answered Mar 7, 2019 in RPA by Mishti
• 480 points
1,361 views
0 votes
1 answer

Write multiple line message using message box

@Rashmi Message Box activity in UiPath does ...READ MORE

answered Mar 4, 2019 in RPA by Abha
• 28,140 points
13,898 views
0 votes
1 answer

How to connect to MySQL database using UiPath?

Follow these simple steps to connect to ...READ MORE

answered Mar 7, 2019 in RPA by Mishti
• 480 points
8,380 views
0 votes
1 answer

How to check if a string exists in datatable using UiPath?

Hi @Ravi, to check whether a string ...READ MORE

answered Mar 19, 2019 in RPA by Anvi
• 14,150 points
17,091 views
0 votes
1 answer

How to install Citrix Extension in UiPath?

Hi Avnish, to install CItrix Entension in ...READ MORE

answered Mar 7, 2019 in RPA by Anvi
• 14,150 points
1,413 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP