How to get sepcific value from datatable using column name

Hi Guys I am struggling with the below issue.
I have an excel containing List of Sender Names and Sender Email ids
I want to read from the datatable DT the email id which is against sender - DEF.
How can i do this , pls advise.


@Rani1978 Please use If else condition,

Here is the XAML file
GetEmails.xaml (8.3 KB)

Thanks MartianxSpace. I was wondering if there can be a direct way to just extract the item directly from datatable without using for each item. I know for sure there will be only one record in the excel pertaining to one sender. I tried the below code -
Assign >>
Array_of_ Datarow = DT.Select(“Sender = ‘DEF’”)
this gave me – DEF I

i want to extract only from this Array_of_Datarows. Is it possible to extract this.
else I’ll have to use For Each Item in DT.

Pls let me know.

@Rani1978 You can use Filter Data Table to Filter the Data

use assign activity like this enside for each row loop
Email = row(“Email Ids”).ToString
Email variable is of type String

Hi @Rani1978,

Please try this…

inputDt.AsEnumerable.Where(function(x) x(“Sender”).ToString.Equals(“DEF”)).CopyToDataTable.Rows(0).ItemArray(1).ToString