Field-Specific Web Searches

I wanted to do field specific full-text searches over the Web without writing LotusScript. I used the Advanced Web Search form from the SearchSite db as the template. The example below searches for demographic data.


REM "Query Field - Text - Computed"
wsep:=@If(AnyAll="1";" AND ";AnyAll="0";" OR ";"");
dsep:=@If(BeforeAfter="0";" = ";BeforeAfter="1";" > ";BeforeAfter="-1";" < ";"");
firstname := @If( FName = NULL ; NULL ; "(FIELD FName Contains " + FName + ")" ) ;
lastname := @If( LName = NULL ; NULL ; "(FIELD LName Contains " + LName + ")" ) ;
pnum := @If( Phone = NULL ; NULL ; "(FIELD Phone Contains " + Phone + ")" ) ;
mail := @If( Email = NULL ; NULL ; "(FIELD Email Contains " + Email + ")" ) ;
loc := @If( City = NULL ; NULL ; "(FIELD City Contains " + City + ")" ) ;
val1 := @Trim( firstname:lastname:pnum:mail:loc ) ;
wdate:=@If
(CreateModify="1";"[_CreationDate]";CreateModify="2";"[_RevisionDate]";"");
wstring := @Implode( val1 ; wsep ) ;
dstring:=@If(QueryDate!="";wdate+dsep+@Text(QueryDate)+@If(BeforeAfter="-1";" AND "+wdate+" > 01/01/1932";"");"");
cstring:=@If(DbCategories!="";"[DbCategories] CONTAINS ("+@Implode(dbcategories;",")+")";"");
@If(wstring!="";"("+wstring+")";"")+@If(wstring!="" & dstring!="";" AND " + "(" +dstring+")"; dstring!="";"("+dstring+")";"") + @If( (wstring!="" | dstring!="") & cstring!="";" AND " +"("+ cstring+")";cstring!="";"("+cstring+")";"")

REM "$$Return Field - text - Computed"
DBName:=@Subset(@DbName;-1);
"[[/"+DBName+"/Contacts?SearchView&Query="+Query+"&SearchOrder="+@Text(Sort)+"&SearchMax="+@Text(MaxResults)+"&SearchWV="+@If(ExactMatch="";"TRUE";"FALSE")+"&SearchThesaurus="+@If(UseThesaurus="";"FALSE";"TRUE")+"]]"

This was first published in March 2001

Dig deeper on Lotus Notes Domino Administration Tools

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.UK

Close