Get row value based on column value

Hi ALL,

I want to get AGE value based on Row Value NAME You can see below

image

Please kindly let me know the solution for this

Thank you.

(From row in dt.AsEnumerable
Where row(“Name”).ToString.Equals(“ganesh”)
Select row(“age”)).ToString

Hi @vineelag ,
You can use read range to get data table as dtData
create variable strAge
for each row
if
row(“name”) = “ganesh”
→ asign strAge = row(“age”)

regards,
LNV

Hi @Nguyen_Van_Luong1

but its dynamic,

like when ever i get ganesh name i need to know age

Once i done with ganesh if get rahul name then i need to get rahul age

Hi @Quenton_Wayne_Rebello

but its dynamic,

like when ever i get ganesh name i need to know age

Once i done with ganesh if get rahul name then i need to get rahul age

create variable strName
change value of strName, will find value Age

1 Like
(From row in dt.AsEnumerable
Where row(“Name”).ToString.Equals(“var_Name”)
Select row(“age”)).ToString

Note:- var_Name is a variable that stores the name like ganesh, rahul etc

1 Like

Hi,

Can you try the following sample using Dictionary?
This assumes name is unique in the table.

Sample20230817-7L.zip (8.5 KB)

Regards,

1 Like

new.xaml (11.8 KB)
Hey I have attached the workflow here!
hope it might help you!

3 Likes

Hi @vineelag ,
I created wf and file input
have dialog,
you can enter name to find age
input(sheet3)
test.xlsx (11.4 KB)

code
tsst.xaml (17.4 KB)

you can try
image


1 Like

@Nguyen_Van_Luong1

I am getting like this, you can see on the Img

This activity does exactly what you need.

https://docs.uipath.com/activities/other/latest/workflow/lookup-data-table

1 Like

@postwick

I am just able to see these packages only,

Not able to see remaining activities

The other activities are in Programming and Workflow at the bottom which you need to expand. Or you can use the search box at the top.

image

@postwick

image

I was Updated my
image

Click the filter and select classic and see if it’s there.

What dependencies do you have installed?

1 Like

@postwick

got it

Thank you

oh, dont care about in comment, you need edit file path only

this is new file no comment

test.xaml (13.5 KB)
regards,
LNV

1 Like

Hi @Nguyen_Van_Luong1

Thank you so much but i need to compare once excel value in another excel value

for each excel1 value if its contains excel2 or not if yes need to increase the count by adding one (example age is 33 and its from excel1 and contains excel2 so need to increase the final count be 34)

you answer partially correct but need to compare two excels value.

Please let me for this.

Thank you

Hi @Yoichi

firstly thank you, you answer is partially correct but i need compare

for example,

excel1 name1 contains in excel2 name column if yes need to increase the age+1

if we tried two for each for excel1 and excel2 its taking more time,
so please let me know if there is any alternative for this.

Thank you!!!