LotusScript – Computed subform QuerySave event

15 pts.
Tags:
Lotus development
Lotus Notes
LotusScript
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?

Answer Wiki

Thanks. We'll let you know when a new response is added.

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)

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Shane44
    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 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following