Scraping Datatable is empty

Hi I need to scrape a particular column(Client Lot Ref. column as shown below) on a website and if there is data then I do Process1 else if there is no data then I do Process2.

I successfully scraped the data and stored in a datatable.
When data is available, I can do process1. However, when there is no data, then how do I pass the argument?

when no data:

I used it in a flowchart with a flow decision activity.
My expression was:

ExtractDataTable is Nothing

or

stringExtractDataTable = 0

But nothing works. It all goes to the FALSE decision branch.

What should I do to make it pass the TRUE decision branch?

ExtractDataTable.rows.count >= 1

If yes → Process1
Else → Process2

Hi @Yudhisteer_Chintaram1

ExtractDataTable is Nothing will work but make sure before data scrapping that you assign extracttable to nothing

image

@Pravin_Patil1 ExtractDataTable.rows.count >= 1 will throw exception if the datatable is empty.

Not if it is initialized. :slight_smile:

@Yudhisteer_Chintaram1 you can add new System.Data.Datatable in default value of data table variable