Filter Data Table: Object reference not set to an instance of an object

Hi there, my automation was working fine but suddenly I am getting the error message:
Filter Data Table: Object reference not set to an instance of an object.

image

image

Variables
GBPO = string, scope = body
BVATdistinct = string, scope = flowchart
BVATtable = datatable
BVATtable2 = datatable

I’m not sure what other info you may require. Can anyone advise please?

@cookiedough

Is bvatable having data?

Can you check please and also in the stirng array are there any null values…

Run in debug mode and check the data from locals panel

Cheers

Yes there should be. I did a Read Range of the excel sheet into BVATtable. There are some cells within the excel sheet that are blank - is that an issue?
I was using the same sheet and it was working fine yesterday with no major changes made…

image

@cookiedough

There might be an issue because of - as well…as it might be read as no value or wmpty value…i would suggest when the error occurs in debug mode go to locals panel and check the current item value and the datatable if they are having data…

On the left when bot is paused you will see the locals panel

Cheers

Hi, I’m at the Local panel and I’m not really sure what I’m looking for:

image

Does this indicate that it read the values?

@cookiedough

  1. Check gbpo is that is null…
  2. Check if the provided column exists in datatble read…

Mostly gbpo is null i believe

Cheers

Thank you! I have checked the following:

  1. GBPO is null - yes, as per the screenshot below:

image

  1. Provided column exists in the datatable - yes, as per the screenshot below.

image

Is there anything else that I can check?

@cookiedough

That is the reason it is failing

So either use a if condition before filter to check if gbpo is null

Isnothing(gbpo) or IsNullOrEmpty(gpbo) will give true if it is null or empty.

Use this in if condition and in then side do the filter

Cheers