Exam4Training

What will be the result of the processing?

A developer uses a For Each Row in Data Table activity to iterate through a sampleDataTable that stores current prices of the product and price at the discount. The developer wants to remove some rows (please see the condition in the If activity) and display, how many rows were left in the datatable.

What will be the result of the processing?

Please find the BuildDataTable wizard below:

A . Message Box activity will throw an error.
B. Message Box activity will display the value: "1".
C. Message Box activity will display the value: "3".
D. For Each Row In Data Table activity will throw an error.

Answer: D

Explanation:

When you try to delete a row inside a For Each Row in Data Table activity, “Collection was modified; enumeration operation might not execute” error will be displayed, as it is not allowed to modify the structure of the datatable (e.g. change positions of datarows, remove them etc.) during iteration.

UiPath Forum

UiPath Documentation

Exam Topic: Describe how to work with complex data structures and data manipulation; for example, datatables and collections.

Exit mobile version