How to get the corresponding values from another column if the value gets matched in the first column

I have been trying to find the specific data in column “Name” and extract the corresponding value from UAN No.

image

For Eg

If Name = Bobb Then it should extract “DC899UA

I have been trying to use
Assigned the Excel into an datatable = dt
Assign the Specific value to string
str1 = “Bobb”
valueReq = Dt.Select(“[Name]=str1”).ElementAt(0)(“UAN No”).ToString

Please suggest

1 Like

Hi

Did we try with LOOK UP DATATABLE ACTIVITY

Have a view on this doc on how to use this ac

Cheers @mayankjha986

@Palaniyappan - Thanks for the suggestion
i have tried using the same activity But i am getting the blank value in the output variable
Any detailed Suggestion

it looks like you are interested on filtering data:

HI @mayankjha986

Here is the workflow

Sequence.xaml (9.9 KB)

Regards
Gokul

ppr. No I dont want to filter the data, I just need to find the Specific value in column “Name” if it is found , Just want to extract the corresponding value from column UAN No.

you will filter on the rows where the name is a particular searchTerm and from this found datarow you will grab the value of UAN No column, right?

Fine

Hope the below steps would help you resolve this

  1. Use a READ RANGE activity and get the output as dt

  2. Now use a LOOKUP DATATABLE activity and pass the below inputs

Datatable - dt
Lookupvalue - “Bobb”
ColumnName - “Name”
Cell value - stroutput
Target ColumnName - “UAN No”

Where stroutput is your output value

Cheers @mayankjha986

Hi @mayankjha986

In the above post it will get the dynamic values

Here it will look the Bobb and get the " DC899UA"

Regards
Gokul

Thanks @Palaniyappan , Do we have to put any specific variable type into it , As for now i am using String variable

1 Like

Great

It takes only string type @mayankjha986

Is there any further queries on this topic

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