I have an embedded view showing on Form A. The embedded view lists all Form B’s (responses to Form A). I have a button on Form A that saves Form A and creates a new Form B.
The weird thing is when I create the FIRST Form B, it isn’t reflected immediately in the embedded view once Form B is save/closed. If I exit Form A and go back in, the document shows in the embedded view. If I add a SECOND Form B, it shows up in the embedded view immediately too (just like I want the first one to do). It does this hiding of the first Form B whether or not Form A is in edit mode.
I have ‘Refresh Display’ on in the view property of the embedded view.
What am I missing?
Subject: Embedded view: I have also tried…
I have also tried getting/saving the parent from the QuerySave of the child document. Nothing seems to ‘refresh’ that embedded view with the first document except F9 or clicking a keyword that refreshes.
What is so different about the FIRST document in the embedded view??
Subject: Embedded view: I have also tried…AND…
ComputeWithForm
Subject: Embedded view update
When you create the first document, the category for those documents does not yet exist in the view, so the single category isn’t merely blank – it has failed altogether. When you close and reopen the “host” document after creating the first document in the category, the category will exist and the expected category of the embedded view will load and refresh as required.
Subject: RE: Embedded view update
So will anything force that to happen besides closing the parent and reopening it? I’ve tried refreshing and saving everything I could think of.
Subject: RE: Embedded view update
Not that I’m aware of. As far as I know, it’s just as “sticky” as a computed subform, so closing and re-opening is your only real plan of action.
Subject: RE: Embedded view update
Thanks for your time … it’s at least comforting to know that I’m not missing something very obvious!
Subject: Embedded view update
This has always been an issue with embedded views. There are a few workarounds available.
If you click in the view and hit F9 (you may need to do it twice) the document will appear. If you are able to leave Form A in edit mode then doing an F9 once or twice while the form has focus will ordinarily refresh the embedded view as well.
The trick is forcing the embedded view to refresh once you know that Form B has been saved.
I’ve done it a few different ways in the past. If you have the ability to leave Form A in edit mode and Form B is not too complex then you could try using Lotusscript and a dialogbox to capture the content of Form B. Save the content and then refresh Form A all from within the same button.
Another technique using Lotusscript would be to move the create button from Form A to the embedded view. You would need to get a handle to the parent document and then create your Form B document, add whatever fields you want to inherit from the parent, make it a response to the parent, save it, refresh the view, and then pop it open in its own UI.
There are pros and cons for each method (as well as other methods) depending on your situation.
Hope that helps.