# Linq support

**URL:** <https://forum.uipath.com/t/linq-support/5689028>\
**Category:** Studio\
**Tags:** datatable, question, studio, activities\
**Created:** [November 25, 2025, 4:47pm UTC](https://forum.uipath.com/t/linq-support/5689028 "2025-11-25T16:47:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![manoj2500](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/manoj2500/32/128341_2.png) [@manoj2500](https://forum.uipath.com/u/manoj2500)\
**Post date:** [November 25, 2025, 4:47pm UTC](https://forum.uipath.com/t/linq-support/5689028/1 "2025-11-25T16:47:23Z")

</div>

I have a datatable that has Column A , B , C D E, D is only blank column now I want to do is I want the values from C column to be picked one after the other and check that in Column A if available then pick corresponding value from Column B and populate the data in Column D

---

<div class="post-metadata">

**Author:** ![AkshaySandhu](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/akshaysandhu/32/77316_2.png) [@AkshaySandhu](https://forum.uipath.com/u/AkshaySandhu)\
**Post date:** [November 25, 2025, 6:33pm UTC](https://forum.uipath.com/t/linq-support/5689028/2 "2025-11-25T18:33:22Z")

</div>

We will need more detail about the scenario as your explanation is unclear.  
It would be great if you can give sample input and output.

---

<div class="post-metadata">

**Author:** ![David\_Hernandez2](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/david_hernandez2/32/553801_2.png) [@David\_Hernandez2](https://forum.uipath.com/u/David_Hernandez2)\
**Post date:** [November 25, 2025, 7:07pm UTC](https://forum.uipath.com/t/linq-support/5689028/3 "2025-11-25T19:07:59Z")

</div>

Sir this makes no sense. Rewrite your question.

---

<div class="post-metadata">

**Author:** ![MohammedShabbir](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/mohammedshabbir/32/558335_2.png) [@MohammedShabbir](https://forum.uipath.com/u/MohammedShabbir)\
**Post date:** [November 26, 2025, 4:56am UTC](https://forum.uipath.com/t/linq-support/5689028/4 "2025-11-26T04:56:01Z")

</div>

Hi @manoj2500

If C value exists in Column A, then should take the matching value from Column B  
and write it into Column D.

If this is the scenario, Create an Invoke Code activity , set arguments, use following code.

**Code** :  
For Each row As DataRow In dt.Rows  
Dim result = dt.AsEnumerable().  
Where(Function(r) r(“A”).ToString.Trim = row(“C”).ToString.Trim).  
Select(Function(r) r(“B”).ToString).  
FirstOrDefault()  
row(“D”) = If(result Is Nothing, “”, result)  
Next

 ![image](https://global.discourse-cdn.com/uipath/original/4X/7/d/6/7d694e0ad90759e6b2815926b8a60ab71561c6e3.png)  
 ![image](https://global.discourse-cdn.com/uipath/original/4X/5/a/e/5aefea4b1d4a28383f445ebec66347c5b361e4e4.png)

If helpful, mark as completed. Happy automation 🙂

---

<div class="post-metadata">

**Author:** ![manoj2500](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/manoj2500/32/128341_2.png) [@manoj2500](https://forum.uipath.com/u/manoj2500)\
**Post date:** [November 26, 2025, 10:34am UTC](https://forum.uipath.com/t/linq-support/5689028/5 "2025-11-26T10:34:24Z")

</div>

[input.xlsx](https://forum.uipath.com/uploads/short-url/4yNoQJLpqkdfHFAodiFc8rA7jNw.xlsx) (8.4 KB)  
[outputdata.xlsx](https://forum.uipath.com/uploads/short-url/je9PAPT0jZt8nS9noxcyDwFW9zM.xlsx) (8.4 KB)

I have attached the sample data

Input sheet has A,B,C,D and E columns D is blank  
once i read this as Dt now i want to pull records of Column C ex: 1st Value 745896  
this value now i will check in Column A once found i will get the corresponding value of that cell in B column i.e Q78259 in same way i want to populate column D values. I have tried for each but that is taking lot of time looking for some faster approach @AkshaySandhu @David_Hernandez2@MohammedShabbir

---

<div class="post-metadata">

**Author:** ![MohammedShabbir](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/mohammedshabbir/32/558335_2.png) [@MohammedShabbir](https://forum.uipath.com/u/MohammedShabbir)\
**Post date:** [November 26, 2025, 10:53am UTC](https://forum.uipath.com/t/linq-support/5689028/6 "2025-11-26T10:53:22Z")

</div>

Hi @manoj2500

Its working as expected. verify this. I have attached the code.

 ![image](https://global.discourse-cdn.com/uipath/original/4X/6/2/5/625769fdbe60a19fc2ca2bf89df33ab0c780904f.png)  
[Sequence1.xaml](https://forum.uipath.com/uploads/short-url/2GcCxjxo302KDSWT8fLOux52Rb2.xaml) (10.0 KB)

If helpful, mark as solution. Happy automation

---

<div class="post-metadata">

**Author:** ![AkshaySandhu](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/akshaysandhu/32/77316_2.png) [@AkshaySandhu](https://forum.uipath.com/u/AkshaySandhu)\
**Post date:** [November 28, 2025, 7:34am UTC](https://forum.uipath.com/t/linq-support/5689028/7 "2025-11-28T07:34:06Z")

</div>

I know solution is already accepted but here is more cleaner version:

```auto
Dim Dict_LookUP As Dictionary(Of String, String) = new Dictionary(of String, String)

Dict_LookUP = dt.AsEnumerable().ToDictionary(Function(row) row("Org").ToString,Function(row) row("External").ToString)

For Each row As DataRow In dt.AsEnumerable
	If Dict_LookUP.Keys.Contains(row("Parent").ToString) Then		
		row("User") = Dict_LookUP(row("Parent").ToString).ToString
	End If	
Next row

```

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [December 1, 2025, 7:34am UTC](https://forum.uipath.com/t/linq-support/5689028/8 "2025-12-01T07:34:17Z")

</div>

Closed on December 1, 2025, 7:34am UTC

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