15 pts.
 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?

Software/Hardware used:
ASKED: May 17, 2009  10:05 PM
UPDATED: May 22, 2009  9:08 AM

Answer Wiki:
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 Wiki Answer Submitted:  May 18, 2009  6:55 pm  by  Brooklynegg   3,845 pts.
All Answer Wiki Contributors:  Brooklynegg   3,845 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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.

 15 pts.