APPLICATION DESIGN
To build a program for an event, you can use:
Use event programming to run tasks that users shouldnft have to activate themselves and that are very specific. Event programming is particularly useful when the timing of the program must be precise or the tasks are associated with a particular design element.
For a table of events that can be automated, see Event Descriptions in the Domino Designer Programming Guide.
Examples of event programming
Every design element has events that you can program, but they vary according to the design element. In the Programmerfs pane, click the Objects tab to review the events you can program.
Database Script events
Database Script events pinpoint database-wide activities such as opening and closing a database or deleting and undeleting documents. To access the Database Script events, double-click Database Scripts under Code in the Applications Navigator.
Examples:
View events occur when users work in a specific view or folder. View events include opening or closing a view, adding documents to a calendar view, or adding documents to a folder.
Examples of view and folder events
Examples of calendar view events
Form events occur at the document level when users open or close a document. They are useful for speeding up document display times because they execute only when a specific form event occurs, unlike field recalculations that occur each time a document is saved, opened, or refreshed.
Examples
With QuerySave, you can also execute processing logic and avoid the unnecessary recalculations inherent in computed fields. For example, you have a form with a hidden computed field called State that determines where documents are in the workflow and where they need to be sent. By replacing the field formula with a LotusScript program that sets a field value during the QuerySave form event, set the field value in the document only when it is saved, not when it is opened or refreshed.
Field events capture usersf movements into or away from a field.
The Click event occurs when users click actions or hotspots, or choose tasks from the Actions menu. Other events for actions, buttons, and hotspots allow you to add programming to other events. After the object is loaded, the "initialize" event is triggered and then the click event is triggered.
The Initialize event stores all the programming associated with the agent. Always add the programming to the Initialize event for an agent.
See Also