Hi guys, I have an issue with DataTable lookup.
I am searching for a STRING value in my data table, if it is found there is no issue. After finding the string on column 2, I am getting as output the DOUBLE value from column 1.
But if it is not found I get the following error on my DataTable Lookup activity:
Lookup Data Table: DoubleConverter cannot convert from (null).
How can I handle this null value so the test will continue running?
Create a variable in the rowindex property of lookup datatable activitiy which store the rowindex let’s say index
Put an if Condition with condition as index<>-1
If the condition is true then
Output the value
Else
Do nothing
In this way u can avoid the error
Or
{row(“Number”).ToString,DT2.Rows(index)(1).ToString, DT2.Rows(index)(2).ToString}
other way put an if Condition with condition as output.ToString(" ") (where output is value obtained from lookup datatable activity)
Based on condition u can customize then and else section respectively.