Level 3, Assignment 1 - WIList Issue (DataTable -> DataRow[])

Hello UiPath,

I am having an issue going from a DataTable to an array of type DataRow. When I try to assign the output of the selected rows of the DataTable, I am getting a null reference error. Please see attached pictures. What I did was create a new project and attempt to recreate the error, which I was able to do.



Main.xaml (6.0 KB)
dt_test_createtable.xaml (5.6 KB)

@dmccammond

When datatable is null and when you are trying to select or do any manipulation using that datatable, null reference error will happen.

This usually happens with any object when it is null.

You have created out_DataTable as variable as well as Argument. Just remove the variable. It will work fine.

Again Variable with the same name

2 Likes

Thank you! That seemed to work. I also assigned out_DataTable to a new DataTable before scraping just in case.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.