New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

UiPath-ADPv1 Exam - Topic 4 Question 50 Discussion

Actual exam question for UiPath's UiPath-ADPv1 exam
Question #: 50
Topic #: 4
[All UiPath-ADPv1 Questions]

The following table is stored in a variable called "dt".

What will the value of the qty variable be after executing the Assign activity?

Show Suggested Answer Hide Answer
Suggested Answer: C

The value of the qty variable will be 80 after executing the Assign activity. This is because the expression in the Assign activity is using the LINQ methods AsEnumerable, SkipWhile, and Item to access the data in the dt variable. The dt variable is a DataTable that contains the following data:

Item

Quantity

apple

5

banana

10

mango

20

orange

80

grape

40

The AsEnumerable method converts the DataTable into an Enumerable collection of DataRow objects. The SkipWhile method skips the elements of the collection until the condition is false. The condition is a lambda expression that checks if the value of the Item column is equal to ''mango''. The (0) indexer returns the first element of the collection after skipping. The Item method accesses the value of the Quantity column of the DataRow. The ToString method converts the value into a string. Therefore, the expression will skip the first three rows of the DataTable and return the value of the Quantity column of the fourth row, which is 80.Reference: [DataTable.AsEnumerable Method], [Enumerable.SkipWhile Method], [DataRow.Item Property]


Contribute your Thoughts:

0/2000 characters
Benedict
4 days ago
I remember a similar question where we had to extract values from a data table. I hope I can apply that here.
upvoted 0 times
...
Franchesca
10 days ago
I think the qty variable will be the value from the first row, but I'm not sure if it should be the first column or the second.
upvoted 0 times
...
Stanton
15 days ago
Okay, let me break this down step-by-step. The table has three columns, and the Assign activity is referencing the Qty column. I'll need to carefully examine the table structure and the activity to determine which row the value is being pulled from.
upvoted 0 times
...
Nikita
20 days ago
I've got this! The Assign activity is referencing the Qty column, so the value of the qty variable will be the value in the Qty column for the row that matches the current context. I just need to make sure I've identified the correct row.
upvoted 0 times
...
Louisa
25 days ago
I'm a bit confused by the table structure and how the Assign activity is referencing the data. I'll need to review the table and the activity closely to make sure I understand how the value is being calculated.
upvoted 0 times
...
Martha
1 month ago
Okay, let me think this through step-by-step. The table has three columns - Product, Qty, and Price. The Assign activity is referencing the Qty column, so I just need to figure out which row it's pulling the value from.
upvoted 0 times
...
Goldie
1 month ago
Hmm, this looks like a straightforward data manipulation task. I'll need to carefully examine the table structure and the Assign activity to determine the value of the qty variable.
upvoted 0 times
...

Save Cancel