Search DominoPower's 11,443 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
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.


« Previous  ·  1  ·  2  ·  3  ·  4  ·  5  ·  6  ·  7  ·  Next »
Other articles you might like
Home > Lotus Technologies > LotusScript (64 articles)
   When the debugger won't debug hidden code that isn't hidden
   What to do if the LotusScript debugger won't single-step over code
   Little known traps about Lotus Notes fields
Home > Lotus Technologies > Application Development (48 articles)
   An application for scanning physical mail and distributing it virtually
   How hide-whens in Rich Text can ruin your whole day (and what to do about it)
   Little known traps about Lotus Notes fields
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Syncing Notes with Android phones
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
Latest Lotus Headlines
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> Read all the news
More from the ZATZ journals
Computing Unplugged: Online safety for virtual learning
David Gewirtz Online: CNN commentary and analysis
OutlookPower: Seek and find: Strategies to locate filed-away emails fast
-- 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!

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login