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????
Lotus IBM

Avatar of undefined
Last Comment
Computer101

8/22/2022 - Mon
madheeswar

In the action button, try to refresh the embedded view..like:
set view=db.getview("YourEmbeddedViewName")
call view.refresh
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
Sjef Bosman

Typo
    Dim ws As New NotesUIWorkspace
    Call ws.ViewRefresh
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
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.  


maximjon

ASKER
Another strange thing:

The embedded view works perfectly when embedded on some documents.  
Sjef Bosman

New Notes upgrade installed? What's your version now?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
maximjon

ASKER
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.
Sjef Bosman

Can you try with a higher release?
maximjon

ASKER
Tried with client Ver. 6.5.4 and still having the same problem.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Sjef Bosman

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...
maximjon

ASKER
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.
maximjon

ASKER
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.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Sjef Bosman

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 :-(
maximjon

ASKER
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.
madheeswar

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.,...
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
maximjon

ASKER
Sorry,

I'm not sure I understand your question.
marilyng

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
Computer101

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question