Link to home
Start Free TrialLog in
Avatar of maximjon
maximjon

asked on

Embedded View Refresh Problem

I have an embedded view on a form.  I have an action button on the  embedded view that creates a new document which is supposed to show up in the embedded view.  When I add one document to the view, it does not show up unless I manually refresh.  If I add another document to the view, they both show up without refreshing.  The strange thing is that this used to work fine until a few days ago.  I cannot figure out what I changed in the database that is causing this problem.  I even pulled up a copy of the database that was saved a couple weeks ago and cannot find any significant difference in the code.  Any suggestions????
Avatar of madheeswar
madheeswar
Flag of Singapore image

In the action button, try to refresh the embedded view..like:
set view=db.getview("YourEmbeddedViewName")
call view.refresh
Avatar of Sjef Bosman
Try also with
    Dim ws As New NoteUIWorkspace
    Call ws.ViewRefresh

And in the view's Properties, 2nd tab, select (at the bottom) On Refresh Refresh display
Typo
    Dim ws As New NotesUIWorkspace
    Call ws.ViewRefresh
Avatar of maximjon
maximjon

ASKER

In my code, I already call ws.ViewRefresh

The code on my action button is exactly the same as the code in the old db copy that works.  


Another strange thing:

The embedded view works perfectly when embedded on some documents.  
New Notes upgrade installed? What's your version now?
Notes client is 6.5.1

Domino server is 6.5.3

One thing I just realized:  The embedded view does not work perfectly on the old db copy, but it works when embedded on most documents.  I guess that's why I never noticed the problem on the old db.
Can you try with a higher release?
Tried with client Ver. 6.5.4 and still having the same problem.
I wouldn't know whether Notes works as designed in this case or not.

This could probably help, if you don't mind a kludge:
    http:Q_21759227.html "In order to do multiple transactions simultaneously, you cannot use the same DB handle"

Maybe it can be adapted for your case...
Thanks.  I read through the case but I don't think it applies to my problem very well.  There has to be something relatively simpe I'm missing.  I've done embedded view before in the past with no problem refreshing.
One other bit of information:

In my embedded view, I use the "Show Single Category" option.  I just tried the embedded view with this turned off and the document shows up fine.  When I turn it back on, the problem comes back.  It doesn't show a document until there are two there.
Honestly, I don't know... Be pragmatic: don't continue fighting the windmills, but either force the refresh using the NotesTimer or something comparable, or fundamentally change the approach.

Sorry :-(
One other thing I just noticed (I'm hoping something I say makes a lightbulb go off for someone):

 - Documents that are located at the top of the embedded view work perfectly.  
 - If I delete all of the documents, the embedded view works perfectly.
can u close the emdedded view form before you compose document?

When the documents is saved, you can open the emedded view form and you can see the docs.,...
Sorry,

I'm not sure I understand your question.
Just a quick note.. I wonder when you updated the database to the new copy if you ran @Command(refreshselecteddocuments)   to perform a data migration on all the records.

People often forget to do this.

Also, re-indexing the views might help, as might compacting, and doing the various database maintenance tasks.

sjef's suggestion on the view properties would have been my guess, along with changing the index rate to "after each use", or to some other interval for the view.
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial