- 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
- ContentValidationData Class
- EvaluatedBusinessRulesForFieldValue Class
- EvaluatedBusinessRuleDetails Class
- ExtractorAsyncCodeActivity Class
- ExtractorCodeActivity Class
- ExtractorDocumentType Class
- ExtractorDocumentTypeCapabilities Class
- ExtractorFieldCapability Class
- ExtractorNativeActivity Class
- ExtractorResult Class
- FieldValue Class
- FieldValueResult 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
- Rule Class
- RuleResult Class
- RuleSet Class
- RuleSetResult Class
- 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
- FieldValueDetails Class
- 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
- BasicDataPoint Class - preview
- ExtractionResultHandler Class - preview
- Document Understanding ML
- Document Understanding OCR Local Server
- Document Understanding
- Release notes
- About the Document Understanding activity package
- Project compatibility
- Methods
- Configuring external connection
- 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
- Load Taxonomy
- Digitize Document
- Classify Document Scope
- Keyword Based Classifier
- Document Understanding Project Classifier
- Intelligent Keyword Classifier
- Create Document Classification Action
- Create Document Validation Artifacts
- Retrieve Document Validation Artifacts
- 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
- Document Understanding Project Extractor Trainer
- RegEx Based Extractor
- Form Extractor
- Intelligent Form Extractor
- Redact Document
- Create Document Validation Action
- Wait For Document Validation Action And Resume
- Train Extractors Scope
- Export Extraction Results
- Machine Learning Extractor
- Machine Learning Extractor Trainer
- Machine Learning Classifier
- Machine Learning Classifier Trainer
- Generative Classifier
- Generative Extractor
- Configuring Authentication
- 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
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>.
The 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.
The following sections show the available methods for DocumentData.Data.
The fieldIdOrName parameter is treated both as the identifier and name of the field.
GetFields()
Returns all the information from fields within a document type, except table fields.
Syntax
GetFields()
GetFields()
Return value
An array of all the fields and their associated extracted values.
Example
Check the following example for using the method:
ResultsDataPoint[] allFields = DocumentData.Data.GetFields()
ResultsDataPoint[] allFields = DocumentData.Data.GetFields()
GetField(string)
Returns all field information, based on a given field ID or name.
Syntax
GetField(string fieldIdOrName)
GetField(string fieldIdOrName)
Parameters
-
fieldIdOrNameString: 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.You can discover the field ID and name in the following ways:
- Navigate to the Build section of your project. Select Document type manager for a sample document. Proceed to Fields, then select Advanced Settings for the relevant field.

- Open the Validation Station, and under Document Type, search for existent field names.
- If you are using Document Understanding APIs, you can use the APIs within the Discovery service to retrieve the field names and IDs. Visit Use the Discovery APIs for checking the available API calls.
Return value
The field and its associated extracted values.
Example
Check the following example for using the method, when the desired field ID or name is vendor:
ResultsDataPoint vendorData = DocumentData.Data.GetField("vendor");
ResultsDataPoint vendorData = DocumentData.Data.GetField("vendor");
GetFieldValue(string)
Returns the first field value, based on a given field ID or name.
Syntax
GetFieldValue(string fieldIdOrName)
GetFieldValue(string fieldIdOrName)
Parameters
-
fieldIdOrNameString 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.You can discover the field ID and name in the following ways:
- Navigate to the Build section of your project. Select Document type manager for a sample document. Proceed to Fields, then select Advanced Settings for the relevant field.

- Open the Validation Station, and under Document Type, search for existent field names.
- If you are using Document Understanding APIs, you can use the APIs within the Discovery service to retrieve the field names and IDs. Visit Use the Discovery APIs for checking the available API calls.
Return value
The value reported for a field in an extraction result.
Exceptions
If the fieldIdOrName is not found, then the following exception is thrown: Field {FieldIDOrName} not found.
Example
Check the following example for using the method, when the field ID or name is 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;
GetFieldValue(string, int)
Returns a field value, based on a given field ID or name, as well as the field index, to return a specific value from the values array.
This method applies to simple fields.
Syntax
GetFieldValue(string fieldIdOrName, int index)
GetFieldValue(string fieldIdOrName, int index)
Parameters
-
fieldIdOrNameString 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.You can discover the field ID and name in the following ways:
- Navigate to the Build section of your project. Select Document type manager for a sample document. Proceed to Fields, then select Advanced Settings for the relevant field.

- Open the Validation Station, and under Document Type, search for existent field names.
- If you are using Document Understanding APIs, you can use the APIs within the Discovery service to retrieve the field names and IDs. Visit Use the Discovery APIs for checking the available API calls.
-
indexInt : The index of a specific value.
Return value
The value reported for a field in an extraction result.
Exceptions
- If the
fieldIdOrNameis not found, then the following exception is thrown:Field {fieldIdOrName}not found. - If the
indexis not found, then the following exception is thrown:Index is out of range.
Example
Check the following example for using the method, where field ID is 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
GetFieldValues(string)
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.
Syntax
GetFieldValues(string fieldIdOrName)
GetFieldValues(string fieldIdOrName)
Parameters
-
fieldIdOrNameString 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.You can discover the field ID and name in the following ways:
- Navigate to the Build section of your project. Select Document type manager for a sample document. Proceed to Fields, then select Advanced Settings for the relevant field.

- Open the Validation Station, and under Document Type, search for existent field names.
- If you are using Document Understanding APIs, you can use the APIs within the Discovery service to retrieve the field names and IDs. Visit Use the Discovery APIs for checking the available API calls.
Return value
An array of values reported for a field in an extraction result.
Exceptions
If the fieldIdOrName is not found, then the following exception is thrown: Field {fieldIdOrName} not found.
Example
Check the following example for using the method, where field ID is vendor:
ResultsValue[] fieldValues = DocumentData.Data.GetFieldValues("vendor");
ResultsValue[] fieldValues = DocumentData.Data.GetFieldValues("vendor");
GetTables()
Returns all field information from all tables within a document type.
Syntax
GetTables()
GetTables()
Return value
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.
Example
Check the following example for using the method:
ResultsTable[] tableValues = DocumentData.Data.GetTables();
ResultsTable[] tableValues = DocumentData.Data.GetTables();
GetTable(string)
Returns all field information from a table within a document type, based on a given ID.
Syntax
GetTable(string tableID)
GetTable(string tableID)
Parameters
tableIDString : 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.

Return value
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.
Example
Check the following example for using the method, where table ID is prices:
var tableValues = DocumentData.Data.GetTable("prices");
var tableValues = DocumentData.Data.GetTable("prices");
SetFieldValue(string, ResultsValue)
Overwrites an entire array of values identified by field ID, with the specified value.
Syntax
SetFieldValue(string fieldID, ResultsValue value)
SetFieldValue(string fieldID, ResultsValue value)
Parameters
-
fieldIdOrNameString 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.You can discover the field ID and name in the following ways:
- Navigate to the Build section of your project. Select Document type manager for a sample document. Proceed to Fields, then select Advanced Settings for the relevant field.

- Open the Validation Station, and under Document Type, search for existent field names.
- If you are using Document Understanding APIs, you can use the APIs within the Discovery service to retrieve the field names and IDs. Visit Use the Discovery APIs for checking the available API calls.
-
valueResultsValue : The value that you want to set for a field.
Exceptions
If the fieldID is not found, then the following exception is thrown: Field {FieldIDOrName} not found.
Example
Check the following example for using the method, where we first create the field value using the 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.
After creating the 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);
SetFieldValue(string, ResultsValue, int)
Sets a field value, based on a given field ID or name, and based on a field index.
This method applies to simple fields.
Syntax
SetFieldValue(string fieldID, ResultsValue value, int index)
SetFieldValue(string fieldID, ResultsValue value, int index)
Parameters
-
fieldIdOrNameString 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.You can discover the field ID and name in the following ways:
- Navigate to the Build section of your project. Select Document type manager for a sample document. Proceed to Fields, then select Advanced Settings for the relevant field.

- Open the Validation Station, and under Document Type, search for existent field names.
- If you are using Document Understanding APIs, you can use the APIs within the Discovery service to retrieve the field names and IDs. Visit Use the Discovery APIs for checking the available API calls.
-
valueResultsValue : The value that you want to set for a field. -
indexInt : The index of a specific value.
Exceptions
- If the
fieldIDis not found, then the following exception is thrown:Field {FieldIDOrName}not found. - If the
indexis not found, then the following exception is thrown:Index is out of range.
Example
Check the following example for using the method, where we first create the field value using the 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.
After creating the 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);
SetFieldValues(string, ResultsValue[])
Replaces the entire array of values with another specified value array, for a given field ID or name.
Syntax
SetFieldValues(string fieldID, ResultsValue[] values)
SetFieldValues(string fieldID, ResultsValue[] values)
Parameters
-
fieldIdOrNameString 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.You can discover the field ID and name in the following ways:
- Navigate to the Build section of your project. Select Document type manager for a sample document. Proceed to Fields, then select Advanced Settings for the relevant field.

- Open the Validation Station, and under Document Type, search for existent field names.
- If you are using Document Understanding APIs, you can use the APIs within the Discovery service to retrieve the field names and IDs. Visit Use the Discovery APIs for checking the available API calls.
-
valuesResultsValue[] : The array of values that you want to set for a field.
Exceptions
If the fieldID is not found, then the following exception is thrown: Field {FieldIDOrName} not found.
Example
Check the following example for using this method, where we first create two field value objects using the 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.
After creating these field values, we replace the values of a field named 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