|
|
|
|
|
|
|
|
|
|
|
|
|
|
Control your application's agents with this Agent Launchers tool (continued)
Launching agents on schedule The Actions Menu agent launchers provide complete flexibility in controlling how UI agents are displayed and who can launch them, and they allow these UI agents to double as scheduled agents. However, they don't provide any way of controlling the agents' schedules. To provide this level of control, a custom interface must be created to duplicate the scheduling functionality built into Notes.
Specifying a schedule
The first step is to create a configurable list of available scheduled agents and build an interface that manages monthly, weekly, daily, and timer schedules for those agents. The sample database provides this interface via an Agent Schedule form (frmAGTSchedule) and view (vwAGTLaunchSchedules). Essentially, each agent schedule document specifies the schedule's general frequency (fFrequency), specific dates or times within that frequency (fWhen), a minimum starting time (fTime), who can edit the schedule (fAuthors), which agent(s) to launch (fAgents), whom to notify when the agents are launched (fSendTo), and whether or not the schedule is currently enabled for launch (fEnabled).
An Agent Launch Schedule is pictured in Figure D.
FIGURE D
 
Here's an Agent Launch Schedule. Roll over picture for a larger image.
Most of these fields are straightforward editable fields, but the fWhen field is a little unusual. It's a combobox that displays one of three lists of options, depending on what frequency is currently selected in the fFrequency field:
@If (
fFrequency = "hourly"; fdHourGaps;
fFrequency = "daily"; "";
fFrequency = "weekly"; fdWeekDays;
fFrequency = "monthly"; fdMonthDays;
""
)
|
The fdWeekDays, fdMonthDays, and fdHourGaps fields are hidden, computed-for-display fields containing hard-coded lists of options. For example, fdWeekDays contains the seven days of the week:
"Sundays|1" : "Mondays|2" : "Tuesdays|3" : "Wednesdays|4" : "Thursdays|5" : "Fridays|6" : "Saturdays|7"
|
Similarly, fdMonthDays contains the days of the month, and fdHourGaps contains hourly intervals. Because these three lists contain different sets of valid options, the fWhen field uses a translation formula to clear itself and assume a default value whenever the fFrequency field changes:
lstWeekDays := @Right(fdWeekDays; "|");
@If (
fFrequency = "monthly" & (fWhen = "" | !@IsMember (fWhen; fdMonthDays)) ; "1st";
fFrequency = "weekly" & (fWhen = "" | !@IsMember (fWhen; lstWeekDays)) ; "Sundays";
fFrequency = "daily"; "";
fFrequency = "hourly" & (fWhen = "" | !@IsMember (fWhen; fdHourGaps)); "01";
fWhen
)
|
Incidentally, this approach can work well for any form containing a field whose options dynamically change based on user input.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Sophisticated Meets Simple For Document Management
Share. Control. Manage.
Documents, emails, and content in the context of how work is done.
Native to Lotus Domino. The User Experience unseen for Lotus Domino.
Do more with less. Really.
See the possibilities Docova unleashes for Lotus Domino. |
-- Advertisement --
Teamstudio Edition 25 has shipped
It's finally here! Now that Teamstudio Edition 25 has shipped, listen to our latest Tool Time audio program to find out what's changed. Updates to all your favorite Teamstudio tools will be discussed.
Plus, you'll get an introduction to Teamstudio Undo (formerly known as Teamstudio Snapper).
Tap here to get started! |
|
|
|
|
|
|
|
|
|
|