Accessing the text of a field in a C# batch processing script not working

I'm running a batch processing script after the Recognition stage in the Project Setup Station in which I want to access the content of a field.

The following code gives me the desired content when in document processing mode:
string text = Document.Field(@"Document Section 1\Block").Text;

I would expect the following to work the same in batch processing mode:
string text = Documents[0].Field(@"Document Section 1\Block").Text;

Unfortunately, this throws an error. Also, Documents[i].Children as well as Documents[i].Sections are empty for any applicable i.


How can I access the text of a field in a C# batch processing script?




1 comment

  • Avatar
    Ben Ji

     Problem was not the batch processing mode, but the fact that I checked "Restrict set of Document Definitions being used". If it's unchecked, it works.


Please sign in to leave a comment.