- Overview
- Document Processing Contracts
- Release notes
- About the Document Processing Contracts
- Box Class
- IPersistedActivity interface
- PrettyBoxConverter Class
- IClassifierActivity Interface
- IClassifierCapabilitiesProvider Interface
- ClassifierDocumentType Class
- ClassifierResult Class
- ClassifierCodeActivity Class
- ClassifierNativeActivity Class
- ClassifierAsyncCodeActivity Class
- ClassifierDocumentTypeCapability Class
- ExtractorAsyncCodeActivity Class
- ExtractorCodeActivity Class
- ExtractorDocumentType Class
- ExtractorDocumentTypeCapabilities Class
- ExtractorFieldCapability Class
- ExtractorNativeActivity Class
- ExtractorResult Class
- ICapabilitiesProvider Interface
- IExtractorActivity Interface
- ExtractorPayload Class
- DocumentActionPriority Enum
- DocumentActionData Class
- DocumentActionStatus Enum
- DocumentActionType Enum
- DocumentClassificationActionData Class
- DocumentValidationActionData Class
- UserData Class
- Document Class
- DocumentSplittingResult Class
- DomExtensions Class
- Page Class
- PageSection Class
- Polygon Class
- PolygonConverter Class
- Metadata Class
- WordGroup Class
- Word Class
- ProcessingSource Enum
- ResultsTableCell Class
- ResultsTableValue Class
- ResultsTableColumnInfo Class
- ResultsTable Class
- Rotation Enum
- SectionType Enum
- WordGroupType Enum
- IDocumentTextProjection Interface
- ClassificationResult Class
- ExtractionResult Class
- ResultsDocument Class
- ResultsDocumentBounds Class
- ResultsDataPoint Class
- ResultsValue Class
- ResultsContentReference Class
- ResultsValueTokens Class
- ResultsDerivedField Class
- ResultsDataSource Enum
- ResultConstants Class
- SimpleFieldValue Class
- TableFieldValue Class
- DocumentGroup Class
- DocumentTaxonomy Class
- DocumentType Class
- Field Class
- FieldType Enum
- LanguageInfo Class
- MetadataEntry Class
- TextType Enum
- TypeField Class
- ITrackingActivity Interface
- ITrainableActivity Interface
- ITrainableClassifierActivity Interface
- ITrainableExtractorActivity Interface
- TrainableClassifierAsyncCodeActivity Class
- TrainableClassifierCodeActivity Class
- TrainableClassifierNativeActivity Class
- TrainableExtractorAsyncCodeActivity Class
- TrainableExtractorCodeActivity Class
- TrainableExtractorNativeActivity Class
- Document Understanding Digitizer
- Document Understanding ML
- Document Understanding OCR Local Server
- Document Understanding
- Release notes
- About the Document Understanding activity package
- Project compatibility
- Methods
- Set PDF Password
- Merge PDFs
- Get PDF Page Count
- Extract PDF Text
- Extract PDF Images
- Extract PDF Page Range
- Extract Document Data
- Create Validation Task and Wait
- Wait for Validation Task and Resume
- Create Validation Task
- Classify Document
- Create Classification Validation Task
- Create Classification Validation Task and Wait
- Wait for Classification Validation Task and Resume
- Intelligent OCR
- Release notes
- About the IntelligentOCR activity package
- Project compatibility
- Configuring Authentication
- Load Taxonomy
- Digitize Document
- Classify Document Scope
- Keyword Based Classifier
- Document Understanding Project Classifier
- Intelligent Keyword Classifier
- Create Document Classification Action
- Wait For Document Classification Action And Resume
- Train Classifiers Scope
- Keyword Based Classifier Trainer
- Intelligent Keyword Classifier Trainer
- Data Extraction Scope
- Document Understanding Project Extractor
- RegEx Based Extractor
- Form Extractor
- Intelligent Form Extractor
- Present Validation Station
- Create Document Validation Action
- Wait For Document Validation Action And Resume
- Train Extractors Scope
- Export Extraction Results
- ML Services
- OCR
- OCR Contracts
- Release notes
- About the OCR Contracts
- Project compatibility
- IOCRActivity Interface
- OCRAsyncCodeActivity Class
- OCRCodeActivity Class
- OCRNativeActivity Class
- Character Class
- OCRResult Class
- Word Class
- FontStyles Enum
- OCRRotation Enum
- OCRCapabilities Class
- OCRScrapeBase Class
- OCRScrapeFactory Class
- ScrapeControlBase Class
- ScrapeEngineUsages Enum
- ScrapeEngineBase
- ScrapeEngineFactory Class
- ScrapeEngineProvider Class
- OmniPage
- PDF
- [Unlisted] Abbyy
- [Unlisted] Abbyy Embedded
Document Understanding Activities
PREVIEWMethods
The Generate Data Type setting in the Extract Document Data activity determines the Document Data output types:
- When Generate Data is
True
, Document Data outputs asIDocumentData<ExtractorType>
. - When Generate Data is
False
, Document Data outputs asIDocumentData<DictionaryData>
.
IDocumentData<DictionaryData>
type allows you to retrieve and
modify field values using certain methods. You can also change the document type in the
Validation Station.
DocumentData.Data
.
fieldIdOrName
parameter is treated both as
the identifier and name of the field.
Returns all the information from fields within a document type, except table fields.
Returns all field information, based on a given field ID or name.
fieldIdOrName
String- The ID or name of the field you want to retrieve or set. The method first searches for a match using the ID. If not match is found, it then searches using the same value as the name of the field.
Returns the first field value, based on a given field ID or name.
fieldIdOrName
String- The ID or name of the field you want to retrieve or set. The method first searches for a match using the ID. If not match is found, it then searches using the same value as the name of the field.
fieldIdOrName
is not found, then the following exception is
thrown: Field {FieldIDOrName}
not found.
vendor
:
ResultsValue fieldValue = DocumentData.Data.GetFieldValue("vendor");
// stores the value of the fieldValue object in a string variable
string value = fieldValue.Value;
// stores the confidence of the fieldValue object in a float variable
float confidence = fieldValue.Confidence;
ResultsValue fieldValue = DocumentData.Data.GetFieldValue("vendor");
// stores the value of the fieldValue object in a string variable
string value = fieldValue.Value;
// stores the confidence of the fieldValue object in a float variable
float confidence = fieldValue.Confidence;
index
, to return a specific value from the values array.
This method applies to simple fields.
- If the
fieldIdOrName
is not found, then the following exception is thrown:Field {fieldIdOrName}
not found. - If the
index
is not found, then the following exception is thrown:Index is out of range
.
vendor
, and the index for the desired value is
2
:
ResultsValue fieldValue = DocumentData.Data.GetFieldValue("vendor", 2);
// store the retrieved value in a string variable
string value = fieldValue.Value;
// retrieve and store the confidence level of the field value
float confidence = fieldValue.Confidence
ResultsValue fieldValue = DocumentData.Data.GetFieldValue("vendor", 2);
// store the retrieved value in a string variable
string value = fieldValue.Value;
// retrieve and store the confidence level of the field value
float confidence = fieldValue.Confidence
Returns all values of a field from a document type, based on a given field ID or name.
This method applies not only to multi-value fields but also to fields for which the extraction model provides alternative values. This means a field can have more than one value for alternatives, even if it is not inherently a multi-value field.
fieldIdOrName
String- The ID or name of the field you want to retrieve or set. The method first searches for a match using the ID. If not match is found, it then searches using the same value as the name of the field.
fieldIdOrName
is not found, then the following exception is
thrown: Field {fieldIdOrName}
not found.
Returns all field information from all tables within a document type.
The extracted table field as an array, containing one or multiple ResultsTableValues (to support single and multi-value tables, respectively). Each value has an array of ResultsTableCells. Each cell has an array of ResultsValue which is the standard value object used for simple fields.
Returns all field information from a table within a document type, based on a given ID.
tableID
String- The ID of the table you want to retrieve. You can find the table ID by
navigating to the Build section of your project. Select Document type
manager for sample document. Proceed to Fields, then select
Advanced Settings for the relevant table field.
The extracted table field, containing one or multiple ResultsTableValues (to support single and multi-value tables, respectively). Each value has an array of ResultsTableCells. Each cell has an array of ResultsValue which is the standard value object used for simple fields.
Overwrites an entire array of values identified by field ID, with the specified value.
SetFieldValue(string fieldID, ResultsValue value)
SetFieldValue(string fieldID, ResultsValue value)
fieldIdOrName
String- The ID or name of the field you want to retrieve or set. The method first searches for a match using the ID. If not match is found, it then searches using the same value as the name of the field.
value
ResultsValue- The value that you want to set for a field.
fieldID
is not found, then the following exception is thrown:
Field {FieldIDOrName}
not found.
ResultsValue.CreateWithNoReference
helper method.
The helper method takes the following parameters:
- First parameter represents the value.
- Second parameter represents the confidence.
- Third parameter represents the OCR confidence.
taxValue
field value object, we replace the
potential pre-existing values of the tax
field (if any exist) with
a new array containing only the taxValue
object. In this instance,
the field tax
will assume the new value 10
as we
use SetFieldValue
.
var taxValue = ResultsValue.CreateWithNoReference("10", 1, 1);
documentData.Data.SetFieldValue("tax", taxValue);
var taxValue = ResultsValue.CreateWithNoReference("10", 1, 1);
documentData.Data.SetFieldValue("tax", taxValue);
Sets a field value, based on a given field ID or name, and based on a field index.
This method applies to simple fields.
SetFieldValue(string fieldID, ResultsValue value, int index)
SetFieldValue(string fieldID, ResultsValue value, int index)
fieldIdOrName
String- The ID or name of the field you want to retrieve or set. The method first searches for a match using the ID. If not match is found, it then searches using the same value as the name of the field.
value
ResultsValue- The value that you want to set for a field.
index
Int- The index of a specific value.
- If the
fieldID
is not found, then the following exception is thrown:Field {FieldIDOrName}
not found. - If the
index
is not found, then the following exception is thrown:Index is out of range
.
ResultsValue.CreateWithNoReference
helper method.
The helper method takes the following parameters:
- First parameter represents the values array.
- Second parameter represents the confidence.
- Third parameter represents the OCR confidence.
taxValue
field value object, we proceed to
replace the value at index 1 of the tax
field array with this new
taxValue
object. Here, the SetFieldValue
method is used to replace the value at index 1.
var taxValue = ResultsValue.CreateWithNoReference("10", 1, 1);
documentData.Data.SetFieldValue("tax", new [] {taxValue}, 1);
var taxValue = ResultsValue.CreateWithNoReference("10", 1, 1);
documentData.Data.SetFieldValue("tax", new [] {taxValue}, 1);
Replaces the entire array of values with another specified value array, for a given field ID or name.
SetFieldValues(string fieldID, ResultsValue[] values)
SetFieldValues(string fieldID, ResultsValue[] values)
fieldIdOrName
String- The ID or name of the field you want to retrieve or set. The method first searches for a match using the ID. If not match is found, it then searches using the same value as the name of the field.
values
ResultsValue[]- The array of values that you want to set for a field.
fieldID
is not found, then the following
exception is thrown: Field {FieldIDOrName}
not found.
ResultsValue.CreateWithNoReference
helper
method : total1
and total2
. The helper method
accepts three parameters:
- First parameter represents the actual value.
- Second parameter represents he confidence value.
- Third parameter represents the OCR confidence value.
Total Amount
with an array that includes
total1
and total2
.
var total1 = ResultsValue.CreateWithNoReference("100", 1, 1);
var total2 = ResultsValue.CreateWithNoReference("200", 1, 1);
documentData.Data.SetFieldValues("Total Amount", new []{total1, total2});
var total1 = ResultsValue.CreateWithNoReference("100", 1, 1);
var total2 = ResultsValue.CreateWithNoReference("200", 1, 1);
documentData.Data.SetFieldValues("Total Amount", new []{total1, total2});
GetFields()
- Syntax
- Return value
- Example
GetField(string)
- Syntax
- Parameters
- Return value
- Example
GetFieldValue(string)
- Syntax
- Parameters
- Return value
- Exceptions
- Example
GetFieldValue(string, int)
- Syntax
- Parameters
- Return value
- Exceptions
- Example
GetFieldValues(string)
- Syntax
- Parameters
- Return value
- Exceptions
- Example
GetTables()
- Syntax
- Return value
- Example
GetTable(string)
- Syntax
- Parameters
- Return value
- Example
SetFieldValue(string, ResultsValue)
- Syntax
- Parameters
- Exceptions
- Example
SetFieldValue(string, ResultsValue, int)
- Syntax
- Parameters
- Exceptions
- Example
SetFieldValues(string, ResultsValue[])
- Syntax
- Parameters
- Exceptions
- Example