|
|
|
|
|
|
|
|
|
|
|
|
|
|
Control your application's agents with this Agent Launchers tool (continued)
Using naming standards at the field level may seem too picky, but it has an extra advantage: it helps clarify which field names you arbitrarily chose for the application (e.g., fAnyField, fdDisplayField, ftTempField), and which fields have special meaning to Notes (e.g., SaveOptions, Categories, SendTo). This can make your application's design much more understandable, especially to less experienced Notes developers.
Notes ACL roles are case sensitive, so I make all my reusable tools use lower-case roles. I use @LowerCase when referencing these roles so that I can easily add a tool to an application that uses the same roles with different case (e.g., "[Admin]" instead of "[admin]").
Launching agents manually When designing an agent, you can set "When should this agent run?" to "Manually From Actions Menu". Once an agent is set up this way, it cannot be removed from the Actions Menu, renamed, or set to run on schedule. Use standard Notes features. The best way to avoid duplicating code between identical scheduled and UI agents is to move their code into a script library.
Instead of creating two agents and a script library for every agent that needs to be run manually and on schedule, it's possible to use a single scheduled agent and create a special interface for launching it manually. This may seem like a lot of pain for a little gain, but this interface will provide a lot of flexibility and can be reused in many applications.
The manual launch interface I use consists of a configurable list of UI agents and a launching agent named "Launch Agent...|agtAGTLauncher". The launcher is the only agent in the database that needs to be set to run from the Actions Menu, since it can then launch any other agent.
The configurable list could be stored as a profile document, but I prefer to use standard documents that can be accessed through standard views. The core of my reusable settings tool is the frmSetting form, the vwSettings view, and the vwLookSettings lookup view. For more information about this tool, please refer to my article in the July 2001 issue of Notes.net at http://www.notes.net/today.nsf/lookup/jul2001.
The manual launch interface's setting document is named "ManualLaunchList" and is accessible through vwLookSettings. It contains the list of UI agents in its fValues field. Each entry in the list consists of the name to display for a given agent, a pipe ( | ), and the real name of the agent.
The Application Setting is pictured in Figure C.
FIGURE C
 
Here you can see the Application Setting. Roll over picture for a larger image.
The launcher agent uses @DBLookup to get the list of UI agents, exiting with an error message if the lookup fails. It then breaks the list into two parts, display names and real names, and passes the display names to @Prompt([OkCancelList]). If the user selects a display name and doesn't cancel, the corresponding real name is extracted from its list. Passing this real name into @Command([ToolsRunMacro]) launches the selected agent.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Find unused Lotus Notes groups and clean up your address book
Have you ever wanted to get rid of old Lotus Notes groups that were cluttering up your address book, but you weren't sure if they were used? Find Unused Groups can help.
Find Unused Groups will check your ACL, mail, multi purpose and server groups to help you determine if they are used, and who uses them.
Learn how to easily clean up your address book. |
-- Advertisement --
Struggling with exporting Notes data to spreadsheets? No More!
Try IntelliPRINT, The world's leading Reporting, Dashboards, and Analysis solution for Notes & Domino
- Don't spend unproductive time maintaining different versions of the same spreadsheet
- Preserve data integrity and security in multi-user environments
- Create reports in minutes INSIDE Notes
- Get freedom from iterative report requests, deliver self-serve capabilities
Experience Reporting, Dashboards, and Analysis INSIDE Notes.
Try IntelliPRINT NOW! |
|
|
|
|
|
|
|
|
|
|