Move to a specific document in a view

Hi!

Is it possible to move to the first document in a view matching a query instead of using the FTSearch method?

I would like to be able to search by FirstName or LastName in a view (people view) and then move to the document that is the closest match.

Can this be done or is there an alternate way of doing this or something similar?

Thanks

Mikael Håkansson

Subject: Move to a specific document in a view

Err…what do you mean with “closest match”?You can use the view-method GetDocumentByKey, but this will only work, when the key really exists in the view (in the first column!).

There is an other function, called @Soundex, but I never used it before und I even don’t know, if it’s useful for your problem. There’s an article on LDD: http://www-10.lotus.com/ldd/today.nsf/lookup/Soundex

HTH,

Buzzy

Subject: RE: Move to a specific document in a view

Thanks for all replies.

I´m working on an application where it should be possible to search for users in a specific database.

The reason I would like to avoid the FTSearch method is beause it´s sooo slow.

I have approx. 1000 registered users on the server and it takes about 2-5 seconds before the search is completed. Is this normal when using COM?

I´ve tried using the GetDocumentByKey method, but as ‘Buzzy’ wrote it only works if the key exists.

Thanks

Mikael Håkansson

Subject: RE: Move to a specific document in a view

Also, is there another method that can be used for searching instead of the FTSearch method?

The FTSearch method always return all the documents in the view no matter the number of hits and then truncates the view to contain only the documents matching the query.

//Mikael

Subject: Move to a specific document in a view

check the notes ND6.5 help file on the FTSearch method. After you perform the search you can navigate the results using the normal view methods. If the db is full text indexed, the results are ordered into a list by most relevant. Just use the getfirstdocument method

Subject: Move to a specific document in a view

You can do your search through and then pass the firstdoc match to the uiview.selectdocument method as so:

Call uiview.SelectDocument(firstdoc)