Question
How to find the correct field's name for using in Document.Field("...") constructions?
Answer
Create Batch processing script with following code:
foreach (IField field in Documents[0].Sections[0].Children)
{
FCTools.ShowMessage(field.FullName);
}
Comments
2 comments
Haldor Hardeson
Thanks for the suggestion Ekaterina
But this approach unfortunately just gave me an Index out of range COM-exception ?!
"System.Runtime.InteropServices.COMException (0x80004005): Index out of range. at ABBYY.FlexiCapture.IFields.get_Item(Int32 _index) at Main.Execute(IBatch Batch, IDocuments Documents, IProcessingCallback Processing)"
I also tried to get just the section name with Documents[0].Sections[0]
But that only returned the string: "System.__ComObject" ?!
I was trying to find what the section name of the field should be, but if a loop over the full fields names in the Document could collected be that would of course be even better
BR /Haldor
Dmytro Bezus
Hello Haldor,
Possibly you added the script before recognition or on a document level. Please verify. Here is the screenshot of how it should be configured:
As a result, you will see the field names:
If you still have an error, please create a ticket for the support team.
KR,
Dmytro
Please sign in to leave a comment.