RemoteException wrapping System.ArgumentException: Data Table

Hi All, I created a DataTable and I am trying to use the Lookup DataTable activity to lookup column1 value and get column2 from my DataTable and store that value in a variable. However, when I run my project I keep getting below error msg. Can someone help me?

RemoteException wrapping System.ArgumentException: Data Table
at UiPath.Core.Activities.LookupDataTable.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Whether you want to lookup all the values of column1 or a particular value’s row index???..

I need the program to take the email subject and look it up in column1 and find the corresponding column2 value

Pass your email subject to the LoopUpValue, in the lookup datatable property panel.
You will get the rowindex as the output from the LookUp Datatable activity,
Then get the column2 value using,
Value = dt(rowindex_value)(“Col 2”).

I did per below but now I am getting below error msg:

Exception Type: System.ArgumentNullException
RemoteException wrapping System.ArgumentNullException: Value cannot be null.

Can you check all the parameters you are passing to the activity are not null before passing using a write line or message box and check which param is erroring or giving you the null value?

Hi @darshini,

Usually, this exception is thrown when argument provided to a method is not valid.
So in UiPath, it occurs when there are no returned rows OR if the datatable is empty.

So I’m assuming you’ve specified datatable having those 2 columns and values in it, right…? so check it once and then…

For this you don’t even need to get the rowIndex, you just need to create variable in cellvalue parameter (using ctrl+k).

As shown in below. (Check all the parameters)

here, LoungeName is the variable created (using ctrl+k) in CellValue field. it will hold value from OMS Lounge Name column according to that mail subject.

Then, you can use that var in further process.
e.g. In If activity, condition should be —> Not String.IsNullOrEmpty(LoungeName)

Okay, that’s it. :slight_smile:

I found the issue. My data table was not part of my sequence but it was in my flowchart probably that was why it had a wrapping system exception. I brought the data table into my sequence and it works now.

I also assigned the cell value to a variable as how you did it looks so much easier now :slight_smile: thanks

@darshini

Yeah, that’s why its giving that exception.
Nice!! welcome :blush: