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.
LOTUSSCRIPT AGENTS
LotusScript agents and the Web
By Chris Stoner

LotusScript Agents are powerful tools that can be used in a variety of ways. I often use them to move documents through an Approval Cycle by having the Approver click on a button to either Approve or Deny the document. This works well in Lotus Notes, but how do you get the same functionality over the Web?

There are a number of ways to accomplish this task. We could simply have the Approver set the document to edit mode and select Approve or Deny from a listbox, but that's not intuitive. It would be nice to be able to get the same functionality over the Web as you do in Lotus Notes without changing the user interface or the flow of the document.

Fortunately, there is a way, with LotusScript Agents.

A little background
My example will be simple. I have an Expense Report document that I'd like Approved. I create and submit the Expense Report, and my manager is prompted to Approve or Deny this document. In Lotus Notes, he'd select the Approve button to Approve the Expense Report, and Deny to Deny it. We want the same functionality over the Web. We'll do this by calling a LotusScript Agent over the Web and passing it a few parameters. Figure A is what my manager will see when he opens the document.

FIGURE A


This Expense Report is what my manager will see when he opens my document. Roll over picture for a larger image.

When my manager clicks on the Approve button, the Expense Report will be marked Approved, and my manager's name and the date will be saved into the appropriate fields.

But how do we get my manager's name and a handle to the document? The LotusScript Agent will need to know the document's unique ID in order to find the correct document to mark, and we should mark the document with the Approver's name. To get these two arguments, we'll pass them to our LotusScript agent as parameters. The LotusScript agent will parse the URL that's passed to it for the two parameters that it needs to find the correct Expense Report and mark this document Approved.

How it works
First, let's code the Approve button's URL. In R5, this would look nice as an Action button if you use the Java Applet for the Action bar. However, this button will look cleaner in R4.6x as a graphic. It can, however, be done either way. What I've done is create a graphic in PaintShopPro, as shown in Figure B.

FIGURE B

This is the Approve button graphic I created in PaintShopPro.

[We are not fans of Java applets. We have found that many browsers don't react well to different forms of Java. So if you're able to create a standard .GIF or JPEG graphic, we recommend avoiding the Java applets and application bar. --DG]


1  ·  2  ·  3  ·  4  ·  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
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 --

Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.

The many included activities and demos will make you a pro! Expert instructor help is a click away.

Click here to try a FREE demo course!!

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