Findelement method – MagTek MTMICRImage User Manual

Page 13

Advertising
background image

Methods

9

FINDELEMENT METHOD
Returns the specified parsed card data.

Syntax

MICRImage.FindElement(TrackNum As Integer, RefChar As String, Displacement As Integer,
NumDigits As String, Optional DirectionBack As Variant = False) As String

The FindElement method syntax has these parts:

Part

Description

TrackNum

Track 0 = MicrData
Track 1 = Mag Stripe Track 1
Track 2 = Mag Stripe Track 2
Track 3 = Mag Stripe Track 3 that uses + as a start sentinel
Track 4 = Mag Stripe Track 3 that uses # as a start sentinel
Track 5 = Mag Stripe Track 3 that uses ! as a start sentinel

RefChar

The Character to Find. If N characters long, then the OCX will
look for the Nth instance of that Character.

Displacement

The Number of characters to displace from the RefChar.

NumDigits

An Integer or Character to Find to end the string.

DirectionBack

(optional) If set to True, the OCX looks Right to Left; if set to
False, the OCX looks Left to Right. If not specified, the OCX
looks Left to Right unless the RefChar specified is an End
Sentinel on Magnetic Track Data ("?"), in which case the OCX
looks Right to Left.


Example

Assume the MICRData from a Check Returned:
"T123456789T987654A1234"

MICRImage.FindElement(0,"T",0,"TT")

will return "123456789"

MICRImage.FindElement(0,"TT",0,"A")

will return "987654"

MICRImage.FindElement(0,"TT",0,"2")

will return "98"

Data Type

String

Advertising