I am trying to cancel a Closewindow command in a Lotus Notes database. If the user "escapes" and the Save prompt comes up, they click Yes. At that point, I have a prompt that pops up as a reminder to do something in the form, but then the document saves and exits. Is there a way to put something into my @Prompt to cancel the Closewindow in the Save prompt? The @prompt comes up if doc is being edited but it does not seem to notice until Save that the doc is being edited.
What you probably need here is an input validation formula. It sounds like the data that's on the form at this point is not valid, and you probably don't want to let the save proceed even if the user doesn't close the window (e.g., if they press Ctrl+S), because that would leave incorrect information in the database for others to look at. . .until such time as the user does finally finish and close the document. Of course, that might not happen on the same day -- or at all. The input validation formula can be as long as you need, and can test other fields besides the field you associate it with. However, if you can't do what you need to do with macro language, LotusScript in the Querysave event will accomplish the same purpose.
If you really just want to stop the user from closing a document under certain conditions, and don't much care if they save the data without closing, you would use the Queryclose event of the form, and write it in LotusScript. If you execute the statement Continue = False in the Queryclose event, the document window will not close.
Do you have comments on this Ask the Expert question and response? Let us know.
Dig Deeper on LotusScript
Learn how you can use LotusScript and OLE to create and populate Microsoft Excel spreadsheets, as well as a little bit about Lotus Symphony.
Discover options you can use if you'd like external users to be able to access a workflow-based Notes Domino application through different ...
Learn why you may receive the error message: "Illegal circular use: Audit Trail" when trying to open Lotus Notes documents that use copied forms.