Refresh a view after the FTSearchMethod

Hi,

I don’t reach to refresh a view after an FTSearch on this view.

Here is my piece of code in the PostOpen event of this view (I dont know why but i can’t execute something in the Query Open event).

The query in itself is ok as I can monitor the i and j variables with the debugger.

But the view stay unchanged.

I’ve really searched a lot and didn’t find so much information, I’ve seen stuff about folders but I don’t feel confortable with it.

Please someone, I’m really stuck with it :confused:


Sub Postopen(Source As Notesuiview)

Dim session As New NotesSession

Dim ws As New NotesUIWorkspace

Dim view As NotesView



Set view = Source.View



queryAll = "FIELD form = maDocument"

query = "FIELD form = maDocument AND FIELD txTitle ='ok' "

i = view.FTSearch( queryAll , 0 )

j = view.FTSearch( query , 0 )



view.Refresh

Call ws.ViewRebuild

Call ws.ViewRefresh

End Sub

Subject: RE: Refresh a view after the FTSearchMethod

I also faced same problem once. To solve it what i did is that search all the documents field by field and collect the matching ones in a collection. Rebuilding and refreshing of view happens in database which lies on server which is already busy so these tasks are queued up and if rebuild or refresh get successful, the changes are not reflected on client immidiately as client itself is maintaining some memory to locally store the design elments. Hope this will help you

Win-it