Problem solve Get help with specific problems with your technologies, process and projects.

Trying to cancel Closewindow command in Notes database

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

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...