navgup
asked on
How to prevent the Save Prompt in Notes and move to next/prev document?
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?
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?
How does the view open the document in the other frame?
ASKER
by giving the (right) frame name in the "default target for link in frame" of frame properties.
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:
@SetField("SaveOptions";"1 ");
@if(@Command([FileSave]); @Do(
@SetField("SaveOptions";"0 ");
@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.
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:
@SetField("SaveOptions";"1
@if(@Command([FileSave]); @Do(
@SetField("SaveOptions";"0
@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.
ASKER
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.
ASKER
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.
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.
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.
Ah, to quickly do the original request:
-------------------------- ---------- ---------- -------Nex t Document
@SetTargetFrame("NotesDoc" );
@Command([EditDocument];"1 ");
@SetField("SaveOptions";"1 ");
@SetField("ThisDummy";@Use rName);
@If(@Command([FileSave]);@ SetField(" SaveOption s";"0");"" );
@Command([EditDocument];"0 ");
@SetTargetFrame("NotesDoc" );
@Command([NavNext])
-------------------------- ---------- ---------- ---------P revious Document
@SetTargetFrame("NotesDoc" );
@Command([EditDocument];"1 ");
@SetField("SaveOptions";"1 ");
@SetField("ThisDummy";@Use rName);
@If(@Command([FileSave]);@ SetField(" SaveOption s";"0");"" );
@Command([EditDocument];"0 ");
@SetTargetFrame("NotesDoc" );
@Command([NavigatePrev])
--------------------------
@SetTargetFrame("NotesDoc"
@Command([EditDocument];"1
@SetField("SaveOptions";"1
@SetField("ThisDummy";@Use
@If(@Command([FileSave]);@
@Command([EditDocument];"0
@SetTargetFrame("NotesDoc"
@Command([NavNext])
--------------------------
@SetTargetFrame("NotesDoc"
@Command([EditDocument];"1
@SetField("SaveOptions";"1
@SetField("ThisDummy";@Use
@If(@Command([FileSave]);@
@Command([EditDocument];"0
@SetTargetFrame("NotesDoc"
@Command([NavigatePrev])
ASKER
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 ?
Have you tried this yourself?? or it is theoritical ?
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.
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.
ASKER
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.