Domino Application - View Refresh on Subform

Data is entered on the main form, then a custom button is clicked to bring up a subform.  Once data is entered on subform, a custom button is clicked to return to the main form.

This subforms are then used to create embedded views. I am trying to display these embedded views in the main forms. Everything is working, except the views (embedded) are not refreshing. I have to click ‘Refresh’ button (runs an agent which refreshes embedded views) on the main form.

Sometimes it works, other times, I must click custom "Refresh" button on main form (which runs a custom agent to refresh the subform view).

How can I get the document list to automatically refresh, without fail, when the subform is closed out and I return to the main form?

Really appreciate any help you can give.  This is a business critical process.
fselliottAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sjef BosmanGroupware ConsultantCommented:
First some questions...
This is in the Notes client, a standard Notes application? I suppose so, because in a browser it would be so much easier.
Which version(s) of Notes and Domino are you using?
How are sub-forms "brought up", e.g. is it done through a Dialog Box?
These embedded views, are they real Notes embedded elements, or are they (rich) text fields with a lot of assembled data?

It seems like it's a fairly complex form that you're using, hence it might not be easy (or maybe not even possible) to give you clear or specific answers right away...
1
fselliottAuthor Commented:
Unfortunately, it is in Notes Client. it is in version 8.52. The subform (I call it "subform", but it is also a "Form") is created as a second new UI document. When it gets saved, it will be a new record for the embedded view. This is the view i am trying to dispaly in the main form...Yes, To display this view,  it is created as an embedded view within the main form.
0
Sjef BosmanGroupware ConsultantCommented:
Okay, so in my terminology it is more of a sub-document than a sub-form (maybe even a child document?). Forms and sub-forms are used to display documents in the UI.

Apparently, there is some sort of relationship between main and sub, I suppose they share some sort of key. Correct?

When you open the main document, do you open it in Edit-mode or Read-mode? Probably Read-mode, which (probably) makes it impossible to refresh the opened document.
0
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

fselliottAuthor Commented:
Yes. the relationship is the Main Form's DocumentID (The form that is create with the button will have this number assigned). The embedded view is then categorized by this common DocumentID. I tired opening the document in both Read-Mode and and Edit-Mode. but, the result was not different.
0
Sjef BosmanGroupware ConsultantCommented:
In Edit-mode, an F9 (refresh) might help... In Read-mode, only reopening the document will refresh the displayed contents.

Basically, the idea is to force a refresh of the UI, e.g. using a button (sorry):
     Dim ws As New NotesUIWorkspace
     Call ws.ViewRefresh

The equivalent in Formula language would be
     @Command( [ViewRefreshFields] )

And another, yet rather weird solution, you'll find on this page: http://blog.aashq.nl/blog/blog.nsf/dx/22-02-2010094254FVEC8V.htm?opendocument&comments
0
fselliottAuthor Commented:
I Appricate your inputs. I tried the both refresh processes (lotus script and formula). i even try to emulate "F9" using users32.dll library. None of them worked. But, i have not tried the "weired solution". I will give that a try. if it works, it wont be weired at all.


Thank you again!
0
Sjef BosmanGroupware ConsultantCommented:
Any progress?
0
fselliottAuthor Commented:
Unfortunately, the issue - the embedded views does not display as the document is open - still exists. I have a 'Refresh' button with this code:
Call uidoc.RefreshHideFormulas

Once I click this button, after the document is open, it shows all the embedded views. I tried to use the same line of code, and in a second case, try to call the 'Refresh' agent on the PostOpen event. Neither seems to be working.

Thanks for the following up on the issue.
0
Sjef BosmanGroupware ConsultantCommented:
RefreshHideFormulas won't do what you want, it forces a recalculation of the hide-when formulas only, nothing else. Can you try with ViewRefresh instead?
0
fselliottAuthor Commented:
I have hide when formula for the Embedded view that is why i have RefreshHideFormulas. I actually have these lines in 'Refresh' agent (use by Refresh button).       
Call ws.ViewRefresh    
Call uidoc.RefreshHideFormulas

When i called the same agent ('Refresh') on the PostOpen event its not working.
0
fselliottAuthor Commented:
That is, Agent is running but not refreshing the form (Embedded view stays blank); until i click refresh button.
0
Sjef BosmanGroupware ConsultantCommented:
Sorry to have left you... Busy times!
Any progress?
0
fselliottAuthor Commented:
Unfortunately, I have not been able to get the right answer.
0
ironcladsCommented:
Refreshing content, especially embedded subforms and especially views embedded on forms is not a Lotus strong point.  I've done things similar to what you want, but have always used a web side display, where I have the view content as part of the $$ViewTemplate for the view.  This way I can add form content, etc, and still have the view refreshed as needed.  Also, when another window is called, the JavaScript on the main page waits for the child window to be done, and then refreshes itself.  I haven't had much luck with client side embedded views.  Let me know if I can assist further.
0
Sjef BosmanGroupware ConsultantCommented:
It could also be done using XPages in the Notes client. It'll take you a while to get acquainted with XPages though...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.