By
Published: 08 Nov 2004
I have a "complete" checkbox that when checked, I would like it to automatically stamp a date and name. I have the @today and @username formulas, but the date refreshed upon document opening. I need the date to stay the same as when the box was checked. I have tried onClick and onChange with no luck. Can you please help?
It sounds like the fields are set to be computed to @today and @username. In that case, they will be updated every time the form is refreshed and saved. You should set the time stamp and name fields as Computed, but set the computed value to the name of the field. (Or set them to Computed when Composed and set the value to "".)
In Domino Designer, add LotusScript or JavaScript code to the field's onChange event. When the user changes the value of that checkbox field and then leaves the field, your code will be triggered. The code should check the value of the field (to ensure that it is now checked) and then set the time stamp and name fields to Today and session.CommonUserName, respectively.
Another option would be to remove the checkbox and instead create an action button or a hotspot button called "Complete" and put the @formulas on the button to set the time stamp and user name.
Do you have comments on this Ask the Expert question and response? Let us know.
Dig Deeper on Lotus Notes Domino Formula Language
Upon moving to Lotus Notes 8, some Lotus Notes users received an error message stating: 'Database has not been opened yet.' Find out why here.
Continue Reading
Discover what security settings you need to fix if you encounter the Lotus Notes database error: 'database is not opened yet.'
Continue Reading
Learn the Formula language code that you can use if you'd like your Lotus Notes form with embedded views to stop displaying all response documents.
Continue Reading