LocateText actions

Use the LocateText actions with full-text recognition to locate words or regular expressions on the page. And to move around the page by line or word.

The LocateText action library contains sets of actions that find text on a page. The text can be found dynamically at run time and then can be loaded from fields. The Locate actions use an internal word pointer that allows consecutive actions to be performed to achieve a final goal. Typically, it isn't the search word that is loaded into a field, but words around the search word, which may or may not include the search word.

For example, the locate actions can find the word "Total" on a page and then capture the word to the right of the word "Total", which is typically a numerical value. Then, load the value and position into the field. This allows the field to be set on a page without having to define an exact location by using a fingerprint.

More complex rules can be created to move around. In the previous case of searching for the value next to the word "Total", rules can be constructed that will test the word after "Total" to see whether it is numerical. If not, the rules can search up to before the word "Total" and see whether that word is numerical.

Locate actions require that the page text is recognized and a CCO is created for the page before using them. Some locate actions require both a CCO file and a Layout XML file to have been created before the action is called. Refer to the recognition action libraries to see how to perform recognition and create CCO files and Layout XML files.

The locate actions keep an internal pointer to the word or phrase that is found. This pointer can be moved around by calling the appropriate locate actions. If you find a word and want to move to the next word, this can be achieved by the action GoNextWord. If the location is under the word that is found, the action GoBelowWord can be called.

Review the supported level for the action you are using. Many actions operate on a page or field level object, and other actions operate only on a field. When a locate action operates on a field, that field must have a parent page object.

Refer to the top-level help of the ApplicationObjects action library for an over view of the Datacap Object Hierarchy (DCO).

Refer to the top-level help of the RuleRunnerLogic action library for the smart parameter reference documentation.

Upgrading From Legacy Locate Actions

If your application is using the legacy "Locate" actions, the following lists the LocateText actions that replace them.

A task must use only the "LocateText" actions or the legacy "Locate" actions. Actions between the Location action library and the LocateText action library cannot be mixed as the function is separate.

Locate Action to LocateText Action map
Table 1.
Locate action Locate Text action
AddKeyList SetDynamicKeyList
AggregateKeyList SetAggregateKeyList
CreateVirtualPage CreateVirtualPage
CreateVirtualZone CreateVirtualZone
CreateVirtualZoneFullWidth CreateVirtualZoneFullWidth
DefaultValue Use rrSet() from RuleRunnerLogic to set a field's value.
FilterIt Use DeleteAllCharactersSelected from ValidationAndTextAdjustments
Find_IgnoreCase SetFindCaseSensitivity
FindDBList FindDatabaseListOnPage
FindDBList_InZone FindDatabaseListInZone
FindKeyList FindKeyListWordOnPage
FindKeyList_InZone FindKeyListWordInZone
FindLastKeyList FindKeyListWordOnPageLast
FindLastKeyList_InZone FindKeyListWordInZoneLast
FindLastRegEx FindRegularExpressionOnPageLast
FindLastRegEx_InZone FindRegularExpressionInZoneLast
FindLastRegExList FindRegularExpressionKeyListOnPageLast
FindLastRegExList_InZone FindRegularExpressionKeyListInZoneLast
FindLastWord FindWordOnPageLast
FindLastWord_InZone FindWordInZoneLast
FindNextDBList FindDatabaseListOnPageNext
FindNextDBList_InZone FindDatabaseListInZoneNext
FindNextKeyList FindKeyListWordOnPageNext
FindNextKeyList_InZone FindKeyListWordInZoneNext
FindNextRegExList FindRegularExpressionKeyListOnPageNext
FindNextRegExList_InZone FindRegularExpressionKeyListInZoneNext
FindRegExList FindRegularExpressionKeyListOnPage
FindRegExList_InZone FindRegularExpressionKeyListInZone
GetSelectedBlockType GetSelectedBlockType
GoAboveWord GoAboveWord
GoBelowWord GoBelowWord
GoDownLine GoDownLine
GoFirstLine GoFirstLine
GoFirstWord GoFirstWord
GoLastLine GoLastLine
GoLastWord GoLastWord
GoNextWord GoNextWord
GoPreviousWord GoPreviousWord
GoSiblingBlockNext GoSiblingBlockNext
GoSiblingBlockPrevious GoSiblingBlockPrevious
GoUpLine GoUpLine
GroupNextWords GroupNextWords
GroupPreviousWords GroupPreviousWords
GroupWords GroupWords
IsAlpha IsAlpha
IsCurrency IsCurrency
IsDateValue IsDate
IsNumber IsNumeric
IsSelectedBlockType IsSelectedBlockType
IsValue IsValue
IsValue_RegEx IsValueRegularExpression
LocatePositionRestore LocatePositionRestore
LocatePositionSave LocatePositionSave
MaxLength IsMaximumLength
MergeNextWord Use GroupNextWords
MergePreviousWord Use GroupPreviousWords
MinLength IsMinimumLength
RegExFind FindRegularExpressionOnPage
RegExFind_InBlock FindRegularExpressionInBlock
RegExFind_InZone FindRegularExpressionInZone
RegExFindNext FindRegularExpressionOnPageNext
RegExFindNext_InBlock FindRegularExpressionInBlockNext
RegExFindNext_InZone FindRegularExpressionInZoneNext
ScanRT No replacement
SelectParentBlock SelectParentBlock
SelectParentBlockOuterType SelectParentBlockOuterType
SelectParentBlockType SelectParentBlockType
SelectSnippet No replacement
SetKeyFileEncodingAsUnicode No replacement. Unicode UTF-8 file encoding is automatically detected when the keyfile is loaded.
SetRect See SetPostiion in the Zones action library
SetVirtualPageEndPosition SetVirtualPageEndPosition
SetVirtualPageStartPosition SetVirtualPageStartPosition
UpdateDCOFIeld UpdateTargetField
UpdateField UpdateField
UpdateFieldWithBlock UpdateFieldWithBlock
UpdateFieldWithBlockWithSiblings UpdateFieldWithBlockWithSiblings
ValueInField Use IsValueInText in ValidationsAndTextAdjustments
ValueInField_Fuzzy Use IsValuePercentFuzzy in ValidationsAndTextAdjustments
ValueInField_RegEx Use IsRegularExpressionPatternInValue in ValidationsAndTextAdjustments
WordFind FindWordOnPage
WordFind_InZone FindWordInZone
WordFind_Offset Use AdjustZonesToImageOffset in the Zones action library.
WordFindNext FindWordOnPageNext
WordFindNext_InZone FindWordInZoneNext