Getting error in Assign: Object reference not set to an instance of an object

I am trying to Extract Values from PDF Documents, while running the project I am getting following message.

Assign: Object reference not set to an instance of an object.

what would be the solution?


above is the screen shot of error page.

Hi @88df85c674e849c463fb167b9

This exception will occur when the Variable haven’t passed properly or the Variable doesn’t have value in it. Check once Output Variable of Find Matching Patterns activity has any value or not. Check it in the Immediate panel.

If yes, then just clear the expression in the value field and reinitialize it.

Hope it helps!!

Hi,

It seems row or lenmatch is null (Nothing). Can you check them at Locals panel when workflow stops due to exception?

Regards,

@88df85c674e849c463fb167b9

  1. Check Assign Activity: Review the Assign activity where the error is occurring. Make sure that all the variables and objects used in that activity are initialized properly.
  2. Check Input Data: If you are extracting values from PDF documents, ensure that the PDF file is valid and contains the expected data. If there are issues with the PDF file, it might not be parsed correctly, leading to null references.

Hi @88df85c674e849c463fb167b9 -

Check lenmatch variable has some values in it before assigning to row.

Program File.xaml (17.7 KB)
Hello All,

I am still unable to solve it. I am uploading my program files, if anybody can help me out, it would be very grateful.

Just want to add that, I have run the file and got proper result for frist row, it has extracted values and placed it in to excel as per program. once I have added the loop into the program, it shows mentioned error.

Hi,

To isolate cause, can you try to add if check lenmatch has item using lenMatch.Any in IF activity , as the following?

Or if you always need the first match, FirstMatch property may be better to use.
This returns first match string directly.

image

Sample
Program File.xaml (20.2 KB)

Regards,

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