Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


How to prevent the Save Prompt in Notes and move to next/prev document?

Posted on 2006-06-14
Medium Priority
Last Modified: 2013-12-18
Please don't give me the obvious answer. Read my problem carefully.

In Notes (non-web), I have a frameset with 2 frames.
On the left frame i have a Customer view, listing all the Customer documents (in the view).
On the right frame i edit the Customer document selected in the left frame (just how preview works).

I also have Prev, Next button on the action bar of Customer view (within the frame), which is giving me the control to navigate to next and prev doc.  

The Problem is, when prev/next button is pressed, i want to save the changes in the document and go to the next/prev document without getting the save prompt.

I have tried putting SaveOptions (computed)= "1" and then in the QueryClose of the form, i have @SetField("SaveOptions"; "0")).

It still is giving me the Save prompt. Any suggestion?

Question by:navgup
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
LVL 15

Expert Comment

ID: 16905912
How does the view open the document in the other frame?

Author Comment

ID: 16906103
by giving the (right) frame name in the "default target for link in frame" of frame properties.
LVL 18

Expert Comment

ID: 16908062
Just to verify,

SaveOptions is a field on your form.  It can be editable or computed.  I usually make it editable, and default to "1".
On postModeChange if the form is in edit mode, I usually change the saveOptions value.

If I have a button that is saving the form, then the button does:

@if(@Command([FileSave]); @Do(
   @PostedCommand([Whatever you want]));"")

If you have the SaveOptions in the QuerySave event, but also push a button, the button actions will run first, and THEN the QuerySave event will run.  So, you need it in both places. :)

Second question:  Is the form properties checked to present the save dialog?  If so, then uncheck that.

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.


Author Comment

ID: 16911827
I m still not able to do it. could you pl give me step by step instructions. if it works i will double ur points.

Author Comment

ID: 16914671
Can anyone send me a good sample code or db to use frameset in notes client ? such as having next/prev button on one frame and doc edited in second frame.

LVL 18

Expert Comment

ID: 16916465
Just a quick response,

First create the view with the documents that you want  to show.  
Create two View Actions:  Previous, Next.
In the Previous Action formula: @Command([NavigateNext]) or @Command([NavigatePrev])

Then Create a Frameset, select two frames design.  Name it "Main"

In the LEFT Frame, right click on the Frame and select Frame Properties
Name the frame: "NotesView"

Type: Named Element    next Option select: View
Value: click on the yellow folder and select your view
Default Target for Links in Frame:  "NotesDoc"

Set the other properties for the frame as you see fit. (like check simple appearance to not show the selection margin)
Right Click the RIGHT Frame
Select Frame Properties  
Name this Frame: "NotesDoc"
Type: Named Element
Select: Form
Value : Use the yellow folder and select the main form that you use for the view.  (or you can select a page to display as your default, if you have a page with information, etc.  This will display as default if you don't want the view displaying the first document as default)

Default Target for links in frame: "NotesDoc"

Save your frameset.

Go to Database Properties
Select the Rocket Tab
On Notes Client:  Open Designated Frameset
Then Select The Frameset you just created.

Do the same for the Web Client.

Open the database.. test.

LVL 18

Expert Comment

ID: 16916492
Ah, to quickly do the original request:
-----------------------------------------------------Next Document
-------------------------------------------------------Previous Document

Author Comment

ID: 16917633
Are you sugesting to put these Next Document/Previous Document formulas to be on view action or form action buttons??

Have you tried this yourself?? or it is theoritical ?
LVL 18

Expert Comment

ID: 16919437
Tested before I posted, and put the actions on the view, display the actions on the view action bar.  It's the quick way to make it work.   Unless you want a very long convoluted solution.  

What's the problem?  I usually make it work first, and then figure out how to make it pretty, or change it to do something else.

Author Comment

ID: 16920395
What am i missing ? I copied the same above code in the view action bar and i have 3 problems:
1. The document is not opening in edit mode automatically
2. When i double click on NotesDoc frame, it does change into edit mode but it prompts me to save it again.
3. On the left frame, the cursor is one step ahead. for eg. when i click "Next" to goto 2nd doc (in view), it opens the first doc on the right frame and so on.
LVL 18

Accepted Solution

marilyng earned 400 total points
ID: 16922057
The document is not opening in edit mode automatically<< so when someone clicks on the view entry, and it appears in the right frame, you want it to automatically open in edit mode?

Ah,  you have to be  a bit more specific with what you want, and how capable you are in extrapolating suggestions into workable solutions :)

there are two problems that you are going to face.  If you code a button, then the user can press, CTRL + e to put the document into edit mode and CTRL +S to save it.  So, if you want to be really accurate with this you would have to decide if users can use the keyboard shortcuts, or if you want them to be limited to buttons.

For example.  If you display a view on the left, I don't have to use the prev or next buttons, I can just click on the entry to see it in the right frame.  I can bypass all of your buttons and put the document in edit mode, edit the document and save it without trapping the saveoptions.

So, you have to code for BOTH buttons and keyboard commands.  that is, if that's how you want your workflow to go.

(View left, doc right.)  When you click on view entry in left frame, it appears in right frame and th e document needs to be in edit mode.
  >>>>I need to trap the form events in addition to coding the buttons. Just in case the user doesn't use the buttons.

If you add code to the form events to place a form in edit mode, it will ALWAYS open in edit mode, so consider if there is going to be a time when you don't want it to do this.

Put an editable field: SaveOptions (text) on the top of the form, hide it.

----------------------------------------------------------------------------So, you need to trap on the FORM Events.
Sub Postopen(source as uidocument)  
  if not source.editmode then
      source.editmode = true
   end if
      call source.fieldsettext("SaveOptions","0")
end sub

Sub PostModeChange
     if not source.editmode then source.editmode = true
End Sub

Sub QuerySave(Source as NotesUIDocument, continue as variant)        
     'check for some stuff
  Call source.FieldsetText("SaveOptions","1")
End Sub

Sub PostSave (Source as NotesUIDocument)
   dim doc as Notesdocument
   set doc = source.document
   doc.saveOptions = "0"
End Sub
--------------------------------------------------Then you need to TRAP on your BUTTONS

Save Button:


Here is what the PREV NEXT BUTTONS DO:

@SetTargetFrame("NotesDoc");                         << Sets the target frame to the right NOTESDOC
@Command([EditDocument];"1");                      << Puts the document into EDIT MODE
@SetField("SaveOptions";"1");                           << SETS SAVEOPTIONS TO "1"  (You will be prompted if you hit escape)
                                                                             I did this to add the value to the field on the next line.   But, since I'm moving
                                                                             to the next document, I want to save the current one and then move to the next one,
@SetField("ThisDummy";@UserName);                <<Changes some value in some bogus field
@If(@Command([FileSave]);@SetField("SaveOptions";"0");""); <<Saves the document, and sets save options to "0" so you don't
                                                                             get prompted.
@Command([EditDocument];"0");                        << Takes the document out of edit mode
@SetTargetFrame("NotesDoc");                           <<Sets the target frame
@Command([NavigatePrev])                                 <<Moves to the next document


Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question