MayFlower develops specialty software products for Lotus Notes & Domino.




Chapter 4 - Run Notes Macro
Table of Contents


How Run Notes Macro Works
The Sentinel can run any Notes formula language macros that exists in a database. The Macro Task Document is useful to schedule Macros that need to be run on an Ad Hoc or Regularly scheduled basis. The Sentinel can be used to manage all Macros that are executed in the Notes Environment and thus provide a central point for better management of this important administrative responsibility.

Note: Sentinel v5.3 does not support LotusScript macros or simple macros, only formula macros.

Typical Uses
1. Order Entry wants to assign orders that come from the mainframe to staffers every minute. They schedule the Sentinel to run these macros every minute.

2. The Help Desk wants to assign call numbers to PC created calls via a sequential numbering macro, every 5 minutes.

Points to Remember
1. Sentinel macros can run as frequently as every minute, or as seldom as once a week.

2. All macros must be set as "Run on all documents in view". The selection is done based on the formula or the view selected in the Run Notes Macro Task form.

3. Use the same caution you would use when running macros manually. Always test each macro before running in production.

4. Watch for replication conflicts caused by macros updating data while users are updating data. Macros can cause large numbers of replication conflicts.

Sample Uses
1. Use macros to setup and initialize fields before loading data into Notes. For example, run a macro that sets all field values to 0 before importing sales figures.

2. Roll-over yearly sales: Run a macro just once that moves Total Sales to Previous Year's Sales and clears out YTD sales numbers in January (or at the end of the fiscal year).

Tips and Techniques

1. Sentinel can schedule Macros using the Schedule (or set) Document. Refer to Example # 10 further on in this manual for details.

2. Prior to running a Macro on a Production Database, we recommend making a copy of the Notes Destination Database and running a test Macro. Double Check your results prior to executing the Macro on the Production Database.


Example: 5. Mark Customers as Active

In this Example, we execute a Notes Macro titled Active Status in the Customer.nsf Notes Database which will stamp the ActiveStatus Field in the Customer Profile Form with the value Active.

1. Double click on the Customer Tracking (Customer.nsf) icon in the Notes Workspace.

2. Examine the Macro titled Active Status. Examine the Macro Formula. This macro will inspect the ActiveStatus field in the Customer Profile form and then insert the value Active into it.

3. Open the Task form 5. Mark Customers as Active in the Tasks.nsf database. Examine how the document is created.