FTSearch in Agent

I have a user button that activates an Agent.

I am trying to get the Agent to create a document collection from another Database using FTSearch. The FTSearch string contains a string from the agent (in the current document).

I can not get the document collection by using the FTSearch. I am sure this is very simple. Any help is appreciated.

Here is my last attempt (of many) to get this to work.


jn = uidoc.FieldGetText( “JobNumber” )

selection = |FIELD JobNumber = | & jn

Set db = New NotesDatabase( “server_name”, “server_path\database_name.nsf” )

Set collection = db.ftsearch(selection,0)


At best I get no document returned. jn is a string from the current document. This string does exist in the JobNumber field of a document in the database that I am trying to FTSearch.

Thank you~

Subject: Never Mind –

I figured out the problem. The field I was searching is a Number field. For some reason the FTSeach string won’t work on a number field.

I even tried variations like, IS EQUAL TO or = . They all errored out. I ended up using a text field to search for and all is fine.