Handle NULL values with data scraping

I have built a simple workflow to extract data from a website. Using the Data Scraping tool I have identified elements to be extracted. Some elements are however not always present. So by running below workflow I get an error: “object reference not set to an instance of an object”. I assume it has to do with the missing element in some cases. Is there a way to handle null values in case elements are not present?

@Gitiyboy, please Check element Exist or image exist first before doing the extract,

other wise you could check on the Data table row count is 0.

let me know if that helps,



sorry for the late reply. I am new to UIPath so i am not sure what you mean. See below for my workflow. Sometimes an element does not exist. In that case I want to get NULL for that element, but now i get an error.

Could you please help?


have If activity to check Datatable (Eindhoven) row count is > 0 then write csv else its null.

some thing like below in IF Criteria
Eindhoven.rows.count > 0


Hi @Gitiyboy,

Use if condition to check the datatable is null or not

True -.> DataTable is null

Regards, Arivu :slight_smile:

@rajeshprabhu_gp @arivu96

do you mean like picture? What do I put in box if True?