Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Set field from Action while opened in Preview Pane?

43 views
Skip to first unread message

Robert Eriksen

unread,
Aug 11, 2009, 5:44:06 AM8/11/09
to
Hello


What I thought would be a simple task, is starting to drive me crazy.
I've created a simple formula action in a folder, to set a value for
the field "Supporter" on a form:

FIELD MyField := "MyValue";


And this works fine as long as the preview pane isn't open.
Unfortunately the preview pane is open 99% of the time, so I would
very much like the action to function then, as well.

But it seems next to impossible to edit a document in previewmode?

I've come up with this so far:

@Command([ShowHidePreviewPane];0);
@Command([EditDocument];1);
FIELD MyFieldr := "MyValue";
@Command([EditDocument];0);
@Command([CloseWindow]);
@Command([ShowHidePreviewPane];1);

The Preview Pane is hidden just fine, and reappears and i can see the
document-tab appearing briefly so I assume the document goes into
Edit-mode (which shouldnt be necessary since the preview pane is
hidden but I'm grasping at straws here), but the field value isn't set
:-(

Anyone have an idea of why, and a solution?


/Robert

Markg_UK

unread,
Sep 2, 2009, 9:44:29 AM9/2/09
to

why not use in a form action


Dim hSession As New NotesSession
Dim hWorkSpace As New NotesUIWorkspace

Dim hDoc As NotesDocument

Set hDoc=hWorkSpace.CurrentDocument.Document

hDoc.MyVal="100"
Call hDoc.Save(True,False)

This works while the doucment in in preview
Regards
Mark

0 new messages