✅ How to Implement Multiple Choice Options in UiPath (Addition, Subtraction, Division, Multiplication)
🧩 Step 1: Take First Number as Input
Activity: Input Dialog
Input Label:
"Enter the first number"
Input Type: Text Box
Output Variable:
Num1
(int32)
🧩 Step 2: Take Second Number as Input
Activity: Input Dialog
Input Label:
"Enter the second number"
Input Type: Text Box
Output Variable:
Num2
(int32)
🧩 Step 3: Ask User to Choose an Operation
Activity: Input Dialog
Input Label:
"Enter the Choice"
Input Type: Multiple Choice
Options (String Array):
{"Addition", "Subtraction", "Division", "Multiplication"}
Output Variable:
Choice
This lets the user select one operation from the dropdown.
🧩 Step 4: Use Switch to Handle the Selected Choice
Activity: Switch
Expression:
Choice
TypeArgument:
String
Create the following Switch cases:
✅ Case 1: "Addition"
"The sum of the numbers is: " + (CInt(Num1) + CInt(Num2)).ToString
✅ Case 2: "Subtraction"
"The difference of the numbers is: " + (CInt(Num1) - CInt(Num2)).ToString
✅ Case 3: "Division"
"The division of the numbers is: " + (CInt(Num1) / CInt(Num2)).ToString
✅ Case 4: "Multiplication"
"The product of the numbers is: " + (CInt(Num1) * CInt(Num2)).ToString
Each case should contain a Message Box to display the result.
✅ Final Workflow Summary
Input Dialog → Get
Num1
Input Dialog → Get
Num2
Input Dialog (Multiple Choice) → Get
Choice
Switch → Based on selected operation
Message Box → Display Result