Addsearchcriteria – Kofax DM API User Manual

Page 163

Advertising
background image

DM API M

ETHODS

AND

P

ROPERTIES

143

AddSearchCriteria

DST = pClient.

GetDST

()


'Now that you have the DST, create a search object.

pSearch = Server.CreateObject( _

"PCDClient.

PCDSearch

")


'Pass the DST to the search object.

pSearch.

SetDST

( DST )


'Add a search Library to the search.

pSearch.

AddSearchLib

("LegalLaw")


'Specify the form to use for this search.

pSearch.

SetSearchObject

("def_qbe")


'Add the return properties you want returned.

pSearch.

AddReturnProperty

("docname")

pSearch.

AddReturnProperty

("docnum")

pSearch.

AddReturnProperty

("AUTHOR_ID")


'Before setting search criteria, get the

'values from the form the user submitted.

AuthorValue =

txtAuthor.Text

DocnumValue =

CInt( txtDocNum.Text )


'Add whatever search criteria you want.

pSearch.

AddSearchCriteria

(%MAXDAYS”, “30”)

If (AuthorValue <>

""

) Then

pSearch.

AddSearchCriteria

( _

“AUTHOR_ID”, AuthorValue)

If (DocnumValue <>

""

) Then

pSearch.

AddSearchCriteria

(“docnum”, DocnumValue)


'Execute the search.

psearch.

Execute

.

.

.

Advertising