Comparing the 2 values

HI Guys,
Im comparing 2 values is equal or not .
i used the syntax
From t1 In Read
From t2 In Sheet
Where(t1.Amount = t2.Due Amount)
Select New {t1, t2}
i have attached the error image.
Any suggestions pls

HI @Rahul_PK

Can you explain your task and can you share the sample input and expected output here? @Rahul_PK

Regards
Sudharsan

need to check the data is equal or not. my input is Amount 80 from a excel sheet this input need to validated with another excel sheet and the header is due amount i need to check is amount = due amount

Can you tell what type of data you need to compare is it a string or datatable

Send sample input and expected output @Rahul_PK

Its a data table

we assume Read, Sheet are datatables, Query should return an Array of Datarows with the matching datarow pairs. Amount, Due Amount are column names

(From t1 In Read.AsEnumerable
From t2 In Sheet.AsEnumerable
Where t1(“Amount”).toString.Trim.Equals(t2(“Due Amount”).toString.Trim)
Select x = New DataRow() {t1, t2}).toList

will return a List(Of DataRow()) - list of datarow array

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

1 Like