System1 Extract Data Table

datatable
datascraping
academy
academy2

#1

Dear all,

I’m going through the Data Table Extraction from the academy. Unfortunately it does not work returning Object Reference not set to an instance of an object.

What can it be? Please find the file in attachment: System1_Extract_DataTable.xaml (8.4 KB)

And please run it after having opened the following webpage: https://www.acme-test.com/work-items.

Thanks a lot for your help

Kind regards

Gennaro


#2

Hello @Gennaro_Bozza

Make sure your DataTable variable is set to default value New System.Data.DataTable

Regards,
Rishabh


#3

Hi @Rishabh_Lakhera

thanks a lot for your reply. Even if I initialize the variable it in the way you suggest, it returns the same error.

My feeling is that the data table is empty, but I don’t know how to check this.

What’s your opinion about it? Any chances you can run the code and check please?

Thanks a lot,

Kind regards

Gennaro


#4

Hi, I looked at your workflow and you have “ContinueOnError” set to true, so if the Extract activity fails to find the selector then it will never set anything to your datatable variable. You might need to change the continueonerror to false and see what error occurs, then make adjustments if needed.

You can also check if the data was extracted by looking at:
(out_dt_WIs is Nothing).ToString //should be False if it has something in it
or
(out_dt_WIs.rows.count).ToString //show how many rows it found if the dt is not nothing


#5

Hi @ClaytonM

thanks for your great insights. Indeed, thanks to your code, I could verify that the data table is empty. Now the question is why is it empty? Where is the mistake? Any chance you could run the code by going to https://www.acme-test.com/work-items? I’m happy to share username and password if you would like.

Thanks

Kind regards

Gennaro


#6

I am also facing same issue and because of data table is empty. Also I tried all the solutions mentioned in above posts but still facing same issue. In case you are you able to fix this issue then can you please share solution or code (xml file :slight_smile: if you can)?

PS: I also tried after resetting data but getting same error message.

image


#7

I was able to resolve my issue :slight_smile:


#8

Hi Navneet, I am having the same issue. Could you please help me out.


#9

Hey @sugunakar13, refer this post and I hope it will help to resolve your issue.

https://forum.uipath.com/t/assignment-1-help/56295/4?u=navneetpanpaliya


#10

Sorry Navneet,I dont have access to that topic.

It is showing the error.


#11

Your datatable is not define that is why its throwing error… add this as a default value for New System.Data.DataTable for ExtractDataTable and also assign selected values in the same workflow instead of assign it in main workflow. I hope you understood and it will help you to resolve your issue.

image

Thank you,
Navneet


#12

Yes, Thanks for the help.