Search DominoPower's 11,323 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 (84 articles)
   A walk down Memory Lane with Lotus Notes
   An application for scanning physical mail and distributing it virtually
   Managing Notes deployments with Teamstudio Build Manager
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 (102 articles)
   More about Domino log files
   Why your log.nsf might not be purging properly
   A faster way to repair corrupted server files
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
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Five trends for 2010
DominoPower TV Episode 1: Inside a strategy session with Teamstudio
More about Domino log files
Say goodbye to the Uh-Ohs. Long live the Tens.
Why your log.nsf might not be purging properly
Latest Lotus Headlines
Recommended Maintenance - Lotus Notes Traveler
Here are the slides and other materials from our Lotusphere session
Microsoft OCS awareness in Lotus Connections and Websphere Portal?
SnTT: XPages Blank Calendar Control (Part 2), adding data
Have your Lotus Notes calendar display multiple time zones
Sample Database for Microsoft Office and Lotus Symphony Integration
Symphony 3.0 beta signals another attack on Office
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad: Apple's latest heartbreaker
David Gewirtz Online: CNN commentary and analysis
OutlookPower: Running auto-respond rules when Outlook is closed
-- 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 --

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!

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