Community

"The name Document does not exist in the current Context".

using Document.Field to get the table row count gives me the error

int NominalCount = Document.Field("Invoice Layout\\Nominal Breakdown").Items.Count;

"The name Document does not exist in the current Context". How can I resolve this?

 

Thank you

Was this article helpful?

0 out of 0 found this helpful

Comments

2 comments

  • Avatar
    Adrian Enders

    Where are you writing this code? Rule script? Stage Script? Try "Context.Document.Fields.."

    0
  • Avatar
    Mariia Indosova

    Hi Sameera!

    Can you tell me where did you use this script?

    Based on my experience, such issue might happen if you use the script in the wrong place.

    Try to go to the Project Properties > Workflow tab > change workflow's schema to the Advanced workflow > create a script stage after recognition. Choose "Document processing" type and put the script there. See screenshots below.

    0

Please sign in to leave a comment.