✅ How to Take Input from User and Display the Sum of Two Numbers in UiPath
🧩 Step 1: Use “Input Dialog” to Get the First Number
Activity: Input Dialog
Dialog Title:
"Sum"
Input Label:
"Enter the first number"
Input Type: Text Box
Output Variable: num1 (
Int32
)
This prompts the user to enter the first number and stores it in the variable A
.
🧩 Step 2: Use Another “Input Dialog” for the Second Number
Activity: Input Dialog
Dialog Title:
"Sum"
Input Label:
"Enter the second number"
Input Type: Text Box
Output Variable: num2 (
Int32
)
This captures the second value entered by the user into the variable B
.
🧩 Step 3: Assign the Sum to a New Variable
Since the input values are strings, they need to be converted to integers before performing arithmetic.
Activity: Assign
To: num3
Value:
(num1+num2)
Here, num3 is an Int32
🧩 Step 4: Display the Result in a Message Box
Activity: Message Box
Text: “the sum of the two numbers are”+ num3.ToString