Bypass or ignore 'Value cannot be null

Hi,

I am trying to retrieve for example ‘name’ and this is read via data scraping.
But name could be read in different ways. So i would like to be able to ignore the ‘value cannot be null’ if the value is not there. It could still be retrieved further down the workflow. Is this possible?

Appreciate it in advance!

1 Like

Hi,

Can you try to use “someVariable isnot Nothing” in condition of IF activity etc as the following?

img20220212-1

Regards,

1 Like

Hi @sirwa,

If I understood your question correctly…

You can use a Build DataTable activity before the Data Scraping.

image

Then, you can set your column to allow null values.

image

Finally, when you use the Data Scraping enter the datatable created in the Build Datatable activity as output.

If this solves your problem, kindly mark this answer as the solution.

Thanks!

1 Like

Appreciate the response!

I might have not mentioned my problem clearly, apologies!
The problem pops up as soon as i try to assign my regex.match to a variable.
If there is no match, i would like to try a different regex to match and create the variable.

But ofcourse it throws the fault:
Value cannot be null.
Parameter name: input

I tried the following: variable = “” within IF activity. Also tried variable IsNot Nothing.

1 Like

If you are getting from regex.matches, you can verify if matches.Count = 0

2 Likes

Hi,

Can you share activity or expression which throw exception,if possible with screenshot etc?

Regards,

2 Likes

Hi @sirwa,

Feel free to share your project if it does not contain private data.

Then, I can take a look and identify what is causing the error.

Thanks!

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.