FindLabelValuePairs

Finds label value pairs in the document or page. Use FindLabelValuePair to extract a value after calling this action.

Syntax

bool FindLabelValuePairs ()

Parameters

None.

Returns

True.

Level

Page level

Details

FindLabelValuePairs analyzes the document or page, finding pairs of labels and their values, which can subsequently be used by other actions to populate fields. The label and values pairs are determined using font attributes and relative positioning of labels to values to identify what is a label and what is a value.

The prepared results can be used by FindLabelValuePair or CopyLabelValuePairs and can be used instead of or in conjunction with locate actions. The results are also saved to the layout XML file, allowing an application developer to easily review the identified pairs and then determine how they should be used within the application.

For example, if the document contains Total: $100.00, a label value pair will be created with the label Total and the value $100. You can then use the FindLabelValuePair action to populate specific fields with found values. You can call the CopyLabelValuePairs action to create a field and value for each match found.

FindLabelValuePairs requires a previously created layout file (for example: tm000001_layout.xml) where text is grouped into blocks. See DocumentAnalytics actions for information on the layout XML file.

Example

Recognize()

FindLabelValuePairs()

FindLabelValuePair(Total,@P\Total