Notes Nerd
Random thoughts from a Lotus Notes Administrator.
Sloppy Saves
Friday, February 17th, 2006
Thanks to Show and Tell Thursday in the Lotus blogger community I now realize that my self-taught (and borrowed) method of creating a button for 'Save and Close' in an application has really not been the best way to handle things. I was previously executing these commands using the following code:@Command([FileSave]);Using these commands can lead users to confusing results if, for instance, the form doesn't pass a validation script. The form that does not pass will still try to close, thus prompting another save and the end result is bad data and a confused/frustrated user. If I were to have stopped, thought about this and then realized the ramifications of that perhaps I would have come up with this code myself:
@Command([FileCloseWindow])
@If(@Command([FileSave]);@Command([FileCloseWindow]);"")This code ensures that if the Save command fails for any reason (like a validation script) then the form does not try to close and the user is given the opportunity to correct the data....without all the confustion.
Thanks to False Positives (Ian Irving ) for the tip.
Permanent Link | Discuss: Add/Read Comments (3)
Posted by: Jamie at: 08:33:20 AM
Location: Programmer Dunce Cap Corner
Technorati :Lotus / Domino

