UiArd Question for Linq Query

Pls help for below questions with explanation and supporting document


@samarth.kulkarni

  1. 3 - As it only counts the value which are having item as Apple…there are 3 rows so 3
    2.Option A - As first will return the first match pear and then quatity will get quantity

cheers

1 Like

thank you @Anil_G for above question can you pls share screenshot ? from UiPath studio ? have tried this performing on the UiPath Studio but getting error ?

@samarth.kulkarni

first question answer is 3 Option:A

second question Option: A

dt_inputdata.AsEnumerable.First(Function(a) a("Item").ToString.Equals("pear"))("Quantity").Tostring

Thank you @Shiva_Nikhil , how to view this output in Studio ? do i have to assign to any variable or ? log message ?

1 Like

@samarth.kulkarni

use assign activity for the expression

1 Like

Hi @samarth.kulkarni

  1. Answer 3 apples - Here the query tells that the count of apples in the column “ITEM”
  2. Answer is getting same for both 1st and 3rd query - This gives the value of pear from column “QUANTITY” Below is the reference sample

1 Like

Hi @samarth.kulkarni

For the first query the option would be option 1 that is 3 apples as the linq query is regarding the count so the query will give how many number of times the word apple have been repeated.

For the second query the option would be option 1 dt1.AsEnumerable.First(Function(x) x("Item").ToString.Equals("pear"))("Quantity").ToString as the linq query is regarding the quantity so the query will give the quantity of pear.

Please check the below workflow for better understanding.

First query:

Second query:

Hope it helps!!

Regards

[HowTo] LINQ (VB.Net) Learning Catalogue - Help / Something Else - UiPath Community Forum

Understanding the 6 Debugging Panels of UiPath in the easiest way possible! - News / Tutorials - UiPath Community Forum

can you pls send the Studio File ? need to check content.

Hi @samarth.kulkarni

Please check the attached xaml

Main.xaml (16.6 KB)

Regards

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.