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.

image

@Rani1978 Please use If else condition,

@Rani1978
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 def@gmail.com

i want to extract only def@gmail.com 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.
Thanks.

@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

Thanks!