Help with db.search with lotus script

I’m doing a
searchFormula ={ Form = “Memo” & @Contains(Body ; “Normal Engineering work hours”)}
Set searchCollection = searchDB.Search( searchFormula, Nothing, 0 )

but it returns 0 documents to the collection, but I know the string is in the database.

it must be the format of the search formula, can anyone help?

I’ve tried { form = “memo” AND FIELD [ BODY] Contains “Normal” ) also with no results…
actual setup:

/Excerpt of code that matters…

Dim searchCollection as NotesDocumentCollection

dim string_searchText as string
dim searchFormula as string
string_SearchText = uidoc.GetFieldText(“searchtext”)

searchformula = | {Form=‘Memo’ AND FIELD [Body] CONTAINS ‘| & string_searchText & |’}|
Set searchCollection = searchDB.Search( searchFormula, Nothing, 0 )

Nothing get returned…

Subject: thanks

Thank you gentlemen… I’ll give a go in a few hours…

Subject: This worked

Bob,

This worked fine.

thank you

Subject: If you can do what Bob says, great! That’s way faster. If not …

… take a look at @Abstract([TEXTONLY]; 64994; “”; “Body”) to retrieve some of the Body field.

Also, you may want @Uppercase() if the string check shouldn’t be case sensitive.

Subject: some info

If the database is full text indexed, try something like this:

Dim session As New NotesSession,db As NotesDatabase,coll As NotesDocumentCollection
Dim query As String, anyString As string
Set db = session.Currentdatabase
anyString = “lwp”
query = |[Form] = “Memo” and [Body]{| + anyString + |}|
Set coll = db.Ftsearch(query, 0)
Print "the number of docs is: " + CStr(coll.count)

If the database is NOT full text indexed, I think the problem you are having is that Body is a RichText field and the query selection does not like rich text. Simply try create a view with:
Select Form = “Memo” & @Contains(Body ; “Normal Engineering work hours”)
Does it return docs? If not, it gets a little more complicated. Let me know.