Object instance not set to reference of an object (Advanced Training Assignment 1)


#1

Hi, i have trouble initialising the DataRow array which filters the data table from the extraction of Workitems. I am not sure how to go about doing it.Can someone help?


#2

Check your data table


#3

Check?The datatable is extracted using the data scaping tool


#4

HI @Derek_Xu,

before assigning the value to datarow[] check the length and assign
Use if condition
dt.select("columnname='something'").length>0
if it is true assign the value.
if its false there is no record match in the column value.

Regards,
Arivu


#5

Hi
Erm, Could you explain further? Do you mean I put the dt.select(“Type=‘WI5’ and Status=‘Open’” in the if condition? Then assign the datarow array after? Before assigning to an output argument?

Thanks


#6

Hi @Derek_Xu,

yes, check in if condition using below condition
dt.select("Type='WI5' and Status='Open'").Length>0

if its true assign the value
WIList=dt.select("Type='WI5' and Status='Open'")

Regards,
Arivu


#7

@Derek_Xu
I think your datatable dt_Wls might be null.
Better while creating the variable itself initialise the variable new DataTable

Regards,
Mahesh


#8

Hello There,

It seems that DataRow is not initialized. please try many times to initialize.

Regards,
Pankaj