Error "Object reference not set to an instance of an object"

Hi All,

I extract some data from email using regex , one of this is date .

when i wite line i got this error “Object reference not set to an instance of an object”

I try solve that but it is not solving could any one help me please

Note : the other data is work fine only the problem with date i do not know what is the issues

Thanks

@coder, Hi

Use an if statement and check if the variable that’s supposed to store the data is empty, so your bot doesn’t break. Or run it in debug mode and highlight elements to help you understand what’s happening.

2 Likes

Hi @coder
The value from matches activity is null follow the steps of @SenzoD
then execution doesn’t break.

Regards,
Aditya

1 Like

Hi @SenzoD @desineediaditya

Thank you for your replay

could you please check this pic

I have the value but it is write that again and give the error how i can solve that

Thanks

Can u show the regex pattern used @coder

Hi @NIVED_NAMBIAR

this

(\d{4}-\d{2}-\d{1,2}).*

I think in matches there is default option for extraction of date

Did u tried that ? @coder

Kindly Check output match value in debug mode and show if it has value

No i will see

@JayakumarSanthanam

yes could you please see this

Try that @coder

Hope it works

If it works let me know

Regards

Nived N :robot:

Happy Automation

1 Like

@SenzoD @desineediaditya @NIVED_NAMBIAR @JayakumarSanthanam

Thank you all , i solve the issue

3 Likes

Hi @coder

Can u tell what was issue

Hi @NIVED_NAMBIAR

sure , yes the value of date is empty , so i think i have other email with same name so it is give me empty value of date so when i delete other email’s , it is work fine .

1 Like