No ratings

If Statements

Topic

 

An If Statement is a powerful tool to be used with RPA. It tests the result of a logical expression, then depending on the evaluation, whether the expression is true or false, you can ask RPA to perform any number of functions.

 

If you want to loop through data, an If statement can help. 

 

You can find the option for an If Statement under the Flow category on the left side of the bot.

 

Instructions

When you need to make a logical decision, for example, you need to have RPA process a different task within your botflow depending on which user is running the botflow, you can add an If Statement and the expression builder to look in the Computer category for Windows Username.

 

MRepetti_0-1625586921870.png

 

The next Action in the botflow would be a Run Task (also located in the Flow Category) and you click the drop down to choose which task from the list of tasks you created.

 

MRepetti_1-1625587001375.png

 

_______________________________________________________________________________________________

 

If you need to RPA to run through data in a loop, an If statement will assist in moving RPA to the next line of data and also tell it when to exit the loop. 

 

Here is an example of a scenario with an If statement and a Loop action:

 

MRepetti_0-1628802991033.png

 

Additional Information

You can also use an If Statement in a simpler way.

 

You do not need it to jump to a new task. It can stay in the main section of your botflow. You can have it evaluate the expression, for example, If YourVariable = A, this would return a True value. In the next action line in your botflow you can add the action you need.

 

MRepetti_0-1625587428136.png

 

Related Links

Labels: (2)
Version history
Last update:
‎03-23-2022 05:24 AM
Updated by:
Contributors