FormatPhoneNumber (Method) - OCR for AnyDoc - Foundation 23.1 - Foundation 23.1 - AnyDoc - external

OCR for AnyDoc Programming Reference Guide

Platform
AnyDoc
Product
OCR for AnyDoc
Release
Foundation 23.1
License

Description

Takes the string expression passed in, attempts to format the string expression as if it were a phone number and return it with either 7 or 10 digits. The leading one, if any, is removed. The area code, exchange and number are separated by hyphens. For example, NNN-NNNN or NNN-NNN-NNNN.

This function is useful to call before comparing two phone numbers to see if they are identical.

Applicable Events

AnyApp Pre-Application, AnyApp Post-Algorithm, AnyApp Post-Application, Post Extract, AnyApp Post Extract, Pre-Verify, Interactive, Verification Function Key (F-Key), Post-Verify, ZoneLink

Syntax

object.FormatPhoneNumber (strValue)

Parameters

Object is a reference to the Utility or Application object. For more information, see Utility Object (page Utility Object) or Application Object (page Application Object).

FormatPhoneNumber is the command.

strValue is the value to format as a phone number.

Example

strPhone1 = Application.FormatPhoneNumber ("18002220414")

strPhone2 = Application.FormatPhoneNumber (MyZone.Value)

If strPhone1 <> strPhone2 Then

MyZone.Flagged = True

End if