0% found this document useful (0 votes)
2 views3 pages

Solution Practice Exercise Data Conversion

The document outlines a practice exercise for creating a workflow that converts an integer to a string using the .ToString method. It details steps for gathering user input (name and age), calculating the year of birth, and displaying a message with the user's name and year of birth. The workflow is to be built in a sequence within a new process named 'Data Conversion' using various activities in a programming environment.

Uploaded by

2502914103188
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views3 pages

Solution Practice Exercise Data Conversion

The document outlines a practice exercise for creating a workflow that converts an integer to a string using the .ToString method. It details steps for gathering user input (name and age), calculating the year of birth, and displaying a message with the user's name and year of birth. The workflow is to be built in a sequence within a new process named 'Data Conversion' using various activities in a programming environment.

Uploaded by

2502914103188
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Practice Exercise-Data Conversion

Build a workflow using the .ToString method that converts an integer to a string.
- Ask the user to input their name and age
- Subtract the age of the user with the current year to get the user’s year of birth
- Display the name and year of birth in a message box in string format

• START
• Use an Input Dialog activity to ask the name and age from the user
• Use an Assign activity and subtract the age of the user from the current year to get the
year of birth of the user
• Use a Message Box activity to display: “Hello User, you were born in Year.”
• Replace the User and Year with name and the year of birth of the user, respectively
• STOP

Step 1: Open Studio.


Step 2: Create a new process and name it as “Data Conversion”.
Step 3: Drag a Sequence activity from the Activities panel and drop it in the Designer
panel.
Step 4: Name the Sequence activity as “Sequence – ‘Data Conversion’”.
Step 5: Right-click on the Sequence activity container and select Annotations from the
context menu.
Step 6: Enter the annotation “This block of code demonstrates a workflow using
.ToString method that converts an integer to string.”
Step 7: Drag and drop an Input Dialog activity, name it as “Input Dialog - User Name”,
add an annotation: “Takes User name as Input” and enter the values as shown
below:

Dialog Title Input Label Input Type


“Name” “Enter your Name” Text Box

RPA Specialization | Data Manipulation in RPA 1|Page


June 2022
Practice Exercise-Data Conversion

Step 8: Insert another Input Dialog activity, name it as “Input Dialog - User Age”, add
an annotation: “Takes User Age as Input” and enter the values as shown below:

Dialog Title Input Label Input Type


“Age” “Enter your Age” Text Box

Step 9: In the Variables panel, create three variables as shown below:

Name Variable type Scope Default


userName String Sequence – ‘Data Conversion’
intUserAge Int32 Sequence – ‘Data Conversion’
intYearOfBirth Int32 Sequence – ‘Data Conversion’

Step 10: In the Properties panel of “Input Dialog - User Name” activity, enter userName
in the Output property.
Step 11: In the Properties panel of “Input Dialog - User Age” activity, enter intUserAge
in the Output property.
Step 12: Insert an Assign activity in the Sequence activity and name it as “Assign - Year
of Birth”. Add an annotation: “Present year - User Age = User's year of birth”
and enter values as shown below:

To Value
intYearOfBirth [Link] – intUserAge

Step 13: Insert a Message Box activity, name it as “Message Box - User Details”, add an
annotation “Print user details” and in the text area enter the expression: "Hello
"+userName+", You were born in "+[Link] .
Step 14: Save and Run the workflow.

RPA Specialization | Data Manipulation in RPA 2|Page


June 2022

You might also like