Unable to Vlookup in Uipath

HI All,

I have tried to Vlookup 2dt where 1st dt is “GCSR1” & 2nd on is “dtsheet3”.
But after the run the process its giving me the error:

"Value not belongs to this DataTable
Here is the 1st dttable

this one is 2nd datatble.
image

I would like to put Vlookup value under Cell_value column.

This is my process flow.

This is lookup properties.
image

Please help me on this issue.

Hi @Asitabha_Deb_asitabhad

It looks like one of the parameters is incorrect. The ColumnName is probably wrong name. I cannot see the column which name is “Column5” in your data tables :wink:
Let me know if that helped.

Regards,
Kamil

Do you have “AddHeaders” checked in Read Range activities? If so, your ColumnName should be " Cell_value". It would be better to keep this name in the variable to have more control of it :wink:

HI Kamil,

My source data is “Value” from 1st dttable and it target is also “value” from 2nd dtdtable and destination column is “Cell_value”.

I have tried with “Value” column and returning me the same error.

1 Like

Ok, are you able to zip the source files and your .xaml files and send it to me so that I would be able to test it on my end?

Please remove the “index” from the columname under target section. Use “Value” in the lookup column name. it should work.

1 Like

I think your flow should be changed. As I understood, you want to take the value from first table (GCSR1) → search for it in the second table (dtsheet3) → write this value also in second data table (dtsheet3 column E). Is that correct?
If yes, you do not need to set “CellValue” output parameters because you already know it as it is your “LookupValu”. what you need to do is set “RowIndex” and if it is not eqal ‘-1’ it means that the value was found so you can just rewrite searched value to the column “Cell_value” with RowIndex.

Let me know if that is correct?

Best Regards,
Kamil

I have already set Row Index in GCSR1 dttable. (1st dttable)
Now I need to just simple Vlookup on both these dttable with column “Value” and put the output in the 2nd dttable under Cell_value column.

HI @kirankumar.mahanthi1,

Still no luck.
image
image

As suggested by @kmisko11 did you check the check box for the add headers for the data table with sheet1 you mentioned in the first screenshot. the error is like we don’t have the Value column in the header of the datatable.

is this GCSR1 data table is the first data table?

Yes,
GCSR 1 is the first datatable.

the column name should be there in the data table. i am not sure why we are getting this error.

otherwise find out the column name like Yourdatatablename.Columns(5).ColumnName.ToString and enter that value in the lookup column name.

Hi,

CellValue here (“cell_index”) does not make sense as per documentation if the TargetColumn is not set the CellValue will be null anyway.

HI ,

It is giving me all green tick but lookup data not written in the destination cell.
image

Do you mean should I assign here Cell_Index = Cell_value?

Could you please use cell_index.tostring that shoud return cell reference. please use log message / message box and see what you are getting.

Why I am getting below error:

image

image

Could you please use log message and print what is the value you are getting from cell_index. i think based on the error it is empty i guess.

1 Like

Yes, it is giving me null value

Hi,

if it is possible could you please share your work flow dependent excel files. i will look into this issue.