Hello team I need one solution
Using this below condition if value is matched I need to write matched if value is not matched need to write not matched.
Where we need add matched and where we need to not matched
Hello team I need one solution
Using this below condition if value is matched I need to write matched if value is not matched need to write not matched.
Where we need add matched and where we need to not matched
As a column update / datatable construction is to do, we need to refer to the different column structures.
Can you share some samples for the two input tables and the expected output? Thanks
ADDED: References
Actually I am using above condition for vlookup between 2 data tables ,so If it’s matched I need to write matched in other column if it’s not matched write not matched in other column
I tried this but no luck if I use this condition
Let slsa=if(nothing(g), nothing,g(1))
Instead of nothing I tried
Let slsa=if(nothing(g), not matched,g(1)) it’s working
But I need matched also
Try this
(From a In collectionsDT.AsEnumerable()
Group Join b In AgeingDT.AsEnumerable()
On a("Bank Invoice") Equals b("Document Number") Into gj = Group
From g In gj.DefaultIfEmpty
Let slsa = If(isNothing(g), Nothing, g(1))
Let rapre = a.ItemArray.Take(2).Append(slsa)
Let rapost = a.ItemArray.Skip(3)
Let ra = rapre.Concat(rapost).ToArray()
Let matchStatus = If(isNothing(g), "Not Matched", "Matched")
Select r = dtResult.Rows.Add(ra.Concat({matchStatus}).ToArray())
).CopyToDataTable()