Simple Action Agent to Modify All Documents

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.

How It Works

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.

Implementation

To implement this solution, complete the following steps.

Step 1.

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).

Step 2.

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

Step 3.

Specify the value to be appended to the selected field.

Step 4.

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.

Категории

© amp.flylib.com,