Hi,
I have not used FTSearch in LotusScript before and am having difficulty setting the search string
I need to be able to check a field for a name on a number of different forms
The fieldname is set in a variant variable and the name is picked up from a field on the current document and stored in a variant variable in the script. Also I am searching in a documentcollection
I have the following searchstring
Searchstring={@Contains(fieldname;‘}+NamedPerson+{’);}
and I get the error Query is not understandable
Can anyone point me in the right direction?
TIA
Subject: Search String problem
If you use a formula as searchstring, use the search method instead of FtSearch
Set notesDocumentCollection = notesDatabase.Search( formula$, notesDateTime, maxDocs% )
Subject: RE: Search String problem
I’m not sure how I can when I need to search in a document collection. There is no option to do a Search only FTSearch!
Subject: RE: Search String problem
Sorry, missed the documentcollection line.
Try
Searchstring=“[fieldName]=”+NamedPerson
or
Searchstring="FIELD fieldName CONTAINS "+NamedPerson
Subject: Search String problem - nearly there
Thanks for the suggestions however neither of them completely work
They give the search string “[fieldname]=value”
and FIELD fieldname=value
where value is the value of NamedPerson
The problem is now how to get the value of the variable fieldname into the search string
Subject: RE: Search String problem - nearly there
Searchstring=“[”+fieldName+“]=”+NamedPerson
or
Searchstring="FIELD “+ fieldName +” CONTAINS "+NamedPerson
Subject: Search String problem - solved
Thanks for all you help Rene
The final solution was to use
Searchstring="FIELD “+Cstr(fieldname)+” CONTAINS "+NamedPerson
Thanks again