Uidocument and Backend Document Problem

hi all,

only NOTES:

i’ve a frameset, some kind of a navigator on the left, the views chosen by the navigator on the right. users are sometimes using the preview pane. sometimes not.

in one of my views i have a button which will donwload some data to excel from the chosen document (unprocessed in db).

the selected document will be downloaded.

the problem now is that if the preview pane is closed the uidocument and the corresp. backend doc do not compute all needed data, as some fields on the form are “computed”. therefor I added a computedForm and in the script I do a simple

computeWithForm.

now the data is correct.

this applies ONLY if the preview pane is closed.

when it’s open, the document is set to edit mode by default (yes, a must have) and the data is allready computed!

when using the computeWithForm line, the data is gone.

is there any way to find out if a document is open in the preview pane?

i tried isuidocopen and this is true in both cases.

i tried to do a simple formula like “@command[showhidepreviewpane];0)” BEFORE the script executes…the preview pane does nothing.

any help is appreciated

thanks

alex

Subject: Uidocument and Backend Document Problem

This is a kludge but what if you added a field to the form that is set to one value when the document is open in edit mode (say 1) - given your document is always in edit mode when previewed based on your specification.

Then in the query close event you set it to something else (Zero)?

Then your code needs to check the value:

If 0 - you know the last event was the close and it’s not in preview mode.

if 1 - it’s being edited (previewed).

Subject: Uidocument and Backend Document Problem

You could try NotesUIWorkspace.CloseDocument and NotesUIWorkspace.EditDocument on the same NotesDocument. This closes the current document and reopens it.

Subject: RE: Uidocument and Backend Document Problem

hi,

i tried uiwks.currentdocument.close (there is no such method described by you) but htis results in “object variable not set” and a notes crash…

damn - i hate this