Search DominoPower's 10,675 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.
PROGRAMMING POWER
A reusable agent to change field values on documents
By Dan Velasco

I was creating a new database in R5 recently and came across a problem I often encounter. I had several categorized documents that I wanted to change the "CategoryName" field of. Now, in the past, what I have done is to write an agent to change the value of the specific field I wanted to change. I've been through this before, however, and I knew that as soon as I made that change I would find another field I wanted to change as well. Therefore, I'd be right back at square one, writing another agent to change a different specific field's value.

Well, I knew there had to be a better way, and after a lot of coding I've found one. My goal was this: create a single agent, that could be used in multiple views, that would allow a user to change the values of fields on multiple documents they'd selected in a view. I'm happy to say that I have achieved my goal, and that is what I'm here to share with you today.

Overview of how it works
The following code is designed to work in Notes/Domino R5 and will not work as-is in Notes/Domino R4.x. It's also designed to work in a view containing similar documents, either created with the same form and/or containing the same fields. The basic structure of how the agent works is described in the next few paragraphs.

The user selects documents that have a field they want to change the value of. A dialog box asks the user to pick the name of the field they want to change, as shown in Figure A;

FIGURE A


The list of fields to change is obtained from the first selected document. Roll over picture for a larger image.

A dialog box asks the user to enter the new value of the field, with the old value given as the default, as shown in Figure B.

FIGURE B


The old value is given as the default in case the change you want to make is slight. Roll over picture for a larger image.

A confirmation screen prompts the user to make sure they want to make this change, as shown in Figure C.

FIGURE C


The confirmation screen ensures that the user is aware that the change will apply to all selected documents. Roll over picture for a larger image.

The change is made on the documents.

If this will be an agent that end-users will use (rather than just yourself), then you also will want to make sure that the names of the fields are clear enough so that the end-user can figure out which field they want to change the value of. This agent is probably best aimed at developers and advanced publishers that have a basic understanding of how Notes fields work.

Agent basics
Since this agent is pretty straightforward and well documented, I'm just going to give you the basics about the agent, how to activate it and the code, letting you play with it as you like. Think of this as kind of a DominoPower tip on steroids. Table A gives you an overview of the agent.


1  ·  2  ·  3  ·  4  ·  Next »
Other articles you might like
Home > Lotus Technologies > Notes (78 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
   Troubleshooting an OpenSuse Notes install
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 > Tips & Techniques (95 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
   Troubleshooting an OpenSuse Notes install
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
What to look for in a Domino-based document management solution
Understanding Domino.doc end-of-life options
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
Top 10 ways to launch and build a Lotus consulting practice (with a little help from the Beatles)
Troubleshooting an OpenSuse Notes install
Incident report: denial of service attack against ConnectedPhotographer.com
Latest Lotus Headlines
SnTT - Enabling ALL the bells and whistles!
Tivoli Data protection causes Domino to crash
Fun when running DB2 CLP scripts
Introducing Flippr, the easy way to admin Quickr
DXL and fake security
Using search forms in IBM Workplace Collaborative Learning 2.7
Schmidt, Freed, and Gering on the OVF Toolkit
>> Read all the news
More from the ZATZ journals
Computing Unplugged: Eight steps to successful and reliable home backups
David Gewirtz Online: CNN commentary and analysis
OutlookPower: Can Outlook run when it's not running (and other mysteries)?
-- Advertisement --

PDF Conversion for Lotus Notes
Convert Lotus Notes documents to PDF for sharing, archiving or web printing.

  • 1-step PDF: As easy as clicking a Lotus Notes toolbar icon
  • Archive email folders or views as a self-contained PDF
  • Convert any document collection into a PDF file
  • Produce print-quality output from Web applications
  • Client side or Server side conversion
  • Doesn't require any DLL files
  • LotusScript API for developers


Ready to learn more?
-- Advertisement --

Good Practices... Better Practices... Teamstudio.
Implementing good practices in your Notes environment doesn't have to be complicated.

Teamstudio provides software and services for efficient Notes development and simple, secure administrator control. Our new website also provides users with a library of resources to help, including:

  • Ready-to-implement policies for good practice development and deployment in Lotus Notes
  • On-demand webinars on topics ranging from tips for better coding, to securing your applications, managing agents, and streamlining your application deployment process
  • Free utilities for download to help you more more efficiently tackle several specific tasks in Notes development
Visit our library of white papers to help you take on difficult issues in your Notes environment.

Drop by our new website and take a look!
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2009, ZATZ Publishing. All rights reserved worldwide.
Editor's Login