UiPath RPA Associate (UiRPA) — Question 19
A developer created an attended automation project to generate and store employee IDs within a company’s HR application. The automation is used while onboarding new employees. The automation is designed as follows:
1. An HR associate enters a new employee's demographic information into an HR form.
2. The robot generates the employee ID in the format XXX-XX-XXXX, where the X's represent integers.
3. After Steps 1 and 2 are completed for all new employees, the robot will enter each employee ID into the HR application.
Which recommended data type should be used to store all new employee IDs?
Answer options
- A. List<String>
- B. String
- C. Int32
- D. String[]
Correct answer: A
Explanation
The correct answer is A, List<String>, because it allows for the storage of multiple employee IDs in a dynamic collection. Option B, String, can only hold a single employee ID, while Option C, Int32, is not suitable since employee IDs are formatted as strings. Option D, String[], is a fixed-size array that does not offer the flexibility of adding or removing IDs easily.