If: Object reference not set to an instance of an object error while using textract variable type inside if block

Hi I am trying to extract data from image using aws textract and my flow looks like the one in image. I am facing the obk=ject reference error when going through if block. please help. i did not find any solutions from other posts and also i am new to ui path
Screen Shot 2021-06-25 at 12.20.59 PM

sorry i am not able to add image here but my if block consists of this

check if pageDetails or PageDetails.HasFormData is nothing/null. You can check it on the locals tab when running in debug

1 Like

No, it is not null, as per your suggestion I have checked the output of the previous step(analyze single page document) in the locals tab. the output shows the contents of the image document. but failing when entering the if block

just put a log message before IF printing the output for

Share some screenshots if you can.

Also if the return is a boolean, you don’t need to convert it to a string to check if its true. If activity expects a boolean

i am getting same error with the log messaage now

Your pageDetails variable is in fact null.

Are you properly assigning the output variable in your activity? Do you possibly have pageDetails variables in different scopes?


1 Like

I found the mistake. I did not assign the page details variable to the output in analyzing single-page document. when i assigned it the issue dissappered.

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