LotusScript - Computed subform QuerySave event
15 pts.
0
Q:
LotusScript - Computed subform QuerySave event
Lotus Notes Client version 5 to 7
Using a computed subform that has specific field values not on main document, so querysave event has to be on the relevant subform.
The QuerySave event on the subform checks the value of a field and if not entered correctly, it displays a dialog box advising the user to re-enter and takes them back to the field that has the error when they click OK.

Issue - When you click OK the document is closed, so the user cannot fix the issue.

It seems that the querysave event on the main document gets run first, as there are no errors, it then moves to the querysave event on the subform, if there is an error it displays the message as usual, but when the user clicks OK it takes them back to the field with the issue for a split second, but as the main forms querysave event has already ran, it closes the document.

Has anyone any idea on how I can stop the document from closing so that the user can fix the issue, then click save again?
ASKED: May 17 2009  10:05 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
1220 pts.
0
A:
 RATE THIS ANSWER
+1
Click to Vote:
  •   1
  •  0
  • AddThis Social Bookmark Button
After prompting the user for the missing information, Continue = False.

I think that should do it.

**ADDITION TO ABOVE**
If the action causing the Save and Close is a Formula Language action you can use:

@If(@Command([FileSave]); @Command([FileClose]); @Return(""))

This means the document will only close if the save is successful, otherwise it will NOT close - the save failed.
Mike Kinder (SlikTool)
Last Answered: May 18 2009  6:55 PM GMT by SlikTool   1220 pts.
Latest Contributors: Brooklynegg   2685 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Shane44   15 pts.  |   May 22 2009  9:08AM GMT

Thank you for your answers.

Yes it was nothing to so with the subform and main form order of running the querysave event, it was that I had added @Command(FileCloseWindow) to my save event. Spent hours on trying to debug this instead of looking at the whole process.

 
0