How to determine the Field with the corresponding error: "The document has hidden fields, some of which have warnings"

Question

How to determine the Field with the corresponding error: "The document has hidden fields, some of which have warnings" in the document definition.

Answer

Add the following code to the Project Properties > Event Handler > After document state changed:

string sErrors = "";
foreach (IRuleError ruleError in Document.RuleErrors)
{
foreach (IField f in ruleError.GetFields())
sErrors += f.FullName.ToString() + " ";
sErrors += " : " + ruleError.Message;
FCTools.ShowMessage(sErrors);
sErrors = "";
}

After that:

  • In the Project Setup Station, create a batch of a default batch type.
  • Load a document there and recognize it.
  • Expand the recognition task log.
  • There will be messages listing all errors and warnings for all fields (including hidden ones):
    mceclip0.png

 

 

Was this article helpful?

4 out of 7 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.