Uipath Certified RPA Associate Uirpa · Free Practice Question Easy
Question 10
Scenario: You have created a workflow and the counter value needs to be evaluated before the body of the loop is executed. You have several Control Flow activities to choose from.
Which should be used?
-
A
Do While
-
B
While
-
C
IF
-
D
Switch
Reveal correct answer
Correct answer: B
Explanation
The Control Flow activity WHILE should be used.
The While Activity
The While activity enables you to execute a specific process repeatedly, while a specific condition is met. The main difference between this and the Do While activity is that, in the first one, the condition is evaluated before the body of the loop is executed.
This type of activity can be useful to step through all the elements of an array, or execute a particular activity multiple times. You can increment counters to browse through array indices or step through a list of items.
https://docs.uipath.com/studio/docs/the-while-activity
The Do While Activity
The Do While activity enables you to execute a specified part of your automation while a condition is met. When the specified condition is no longer met, the project exits the loop.
This type of activity can be useful to step through all the elements of an array, or execute a particular activity multiple times. You can increment counters to browse through array indices or step through a list of items.
The Switch Activity
The Switch activity enables you to select one choice out of multiple, based on the value of a specified expression.
By default, the Switch activity uses the integer argument, but you can change it from the Properties panel, from the TypeArgument list.
The Switch activity can be useful to categorize data according to a custom number of cases. For example, you can use it to store data into multiple spreadsheets or sort through names of employees.
https://docs.uipath.com/studio/docs/the-switch-activity
The If Activity
The If activity contains a statement and two conditions. The first condition (the activity in the Then section) is executed if the statement is true, while the second one (the activity in the Else section) is executed if the statement is false.
If activities can be useful to make decisions based on the value of variables.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
