Pcdlookup – Kofax DM API User Manual

Page 83

Advertising
background image

DM API O

BJECTS

63

PCDLookup

Example

The following example demonstrates how you can use PCDLookup to
create and process a Lookup search. It includes most of the methods
that PCDLookup supports.

Sub Lookup( )

'Create our object

Dim objPCDLookup As New PCDLookup

'Create a property list

Dim objPCDPropList As New

PCDPropertyList

'Set up our propertylist so it can be used later.

objPCDPropList.

AddProperty

"AUTHOR_ID", "J_SMITH"

'Set up the parameters for the lookup.

'Set the DST.

objPCDLookup.

SetDST

strDST

'Set the Library.

objPCDLookup.

AddSearchLib

strLib

'Set the search object. This form must contain

'the lookup (such as client or matter).

objPCDLookup.

SetSearchObject

( "DEF_QBE1" )

'Set the Lookup name.

objPCDLookup.

SetLookupId

"PEOPLE"

'Set the target property to look up.

objPCDLookup.

SetTargetProperty

"AUTHOR_ID"

'Set the search criteria.

objPCDLookup.

SetSearchCriteria

objPCDPropList

'Set the filter criteria.

objPCDLookup.

AddUserFilterCriteria

"AUTHOR_ID", "J*"

'Determine fields to search.

Dim strAns As String, intAns As Integer

Dim strPrompt As String, strTitle As String

strTitle = "Author or Author/Typist Search “ _

& “Selection"

strPrompt = "Current search is only in “ _

& “Author field.” & vbCr & "Do you “ _

& “also wish to search for the person" & _

Advertising