Simple action agents utilize predefined actions to perform a task in the database. Using simple actions, you can quickly build an agent with little to no programming. A few of the simple actions include the following:
To illustrate the concept of a simple action agent, this section explains how to create an agent that modifies all documents by appending a value to a specific field value. Lets say you want to append a comment to the History field for all documents in the database. Using a simple agent, you could append a comment to the field.
Simple action agents are created primarily through a series of Lotus Notes generated dialog windows. The Modify Field action is used to update documents. The agent iterates through all documents and allows you to either replace or append the value for a specific field. The agent loops through each document and, for this example, appends the specified text string to the selected field.
To implement this solution, complete the following steps.
Select the Create > Design > Agent menu options to create the agent. When the properties dialog displays, give the agent a name such as Update History and close the property window. Note: By default, the agent type will be set to Simple action(s).
Click the Add Actions button located at the bottom of the screen to configure the action. Set the action to Modify Field, set Modify by to Appending, and select a field to modify (see Figure 16.1).
Figure 16.1. Using the Add Action dialog to create a simple agent
Specify the value to be appended to the selected field.
Select Add to insert the action into the agent. Save and close the agent to complete the process. To run the agent, open the database in the Lotus Notes client and select Update History from the Actions menu.
An Introduction to the Lotus Domino Tool Suite
Getting Started with Designer
Navigating the Domino Designer Workspace
Domino Design Elements
An Introduction to Formula Language
An Introduction to LotusScript
Fundamentals of a Notes Application
Reference Library Applications
Design Enhancements Using LotusScript
Design Enhancements Using Formula Language
Miscellaneous Enhancements and Tips for Domino Databases
Application Deployment and Maintenance
Appendix A. Online Project Files and Sample Applications
Appendix B. IBM® Lotus® Notes® and Domino®Whats Next?
Lotus Notes Developers Toolbox: Tips for Rapid and Successful Deployment
Authors: Mark Elliott
Similar book on Amazon
XPages Portable Command Guide: A Compact Resource to XPages Application Development and the XSP Language
Practical Intrusion Analysis: Prevention and Detection for the Twenty-First Century: Prevention and Detection for the Twenty-First Century