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
The strange case of Last Modified dates
By Mick Moignard

Just a couple of weeks ago, a colleague and I came across a most bizarre "feature" of Notes. It's all to do with document Last Modified dates. We had a specific need to be able to work through documents using Last Modified dates as a processing trigger -- sounds familiar?. And we found some very peculiar and interesting things.

First of all, a little perspective. As the code in question was to be run as a Lotus Enterprise Integrator (LEI) scripted activity, we could not use the agent's "run on" property of "New of Modified". That's because the LEI Scripted Activity agents live in the LEI Vault database, but actually run on data kept in other databases. The Last Modified property only applies to the database the agent lives in.

So we created a view in the target database, and used the view column value simple selection of Last Modified, as shown in Figure A.

FIGURE A


We selected Last Modified. Roll over picture for a larger image.

OK so far. Until we looked at the view. What we found was that the value in the view wasn't the actual document Last Modified value for the documents, as they were in this database.

Let's have another aside. Look at a document properties box, and at the first tab, in Figure B.

FIGURE B


There's some interesting evidence in this one box, as long as you know where to look. Roll over picture for a larger image.

Notice that there are four dates in it. The first one is the date that the document was initially created in the database it was initially created in. Next comes the date of Last Modified in that same database. Now the next two relate to the actual database that you are looking at -- which, with Notes' fabled replication, doesn't have to be the same instance of the database. And in our case, it wasn't -- the database we were working with is was a distant replica, maybe two servers removed from the one that the end users actually use. And this is where the whole problem started.

We found that the view's simple function Last Modified value came from the Modified entry, at 11:04 in Figure B. This isn't the last modified time in the current database, and to be honest, if it's not in the current database, it can't be relied upon. Even if you think that you have properly synchronised clocks, I'm not sure that you can rely upon them to always be synchronised, and anyway, in our environment, we knew we couldn't rely on this entry.

This was a bit of a bummer for us, because we planned the agent, when it ran, would record the time and date it last ran. Then next time it ran it would look for documents modified after that time, then record that last run time, and so on. We could not stamp the documents that we were processing with a processed flag, because while we were working on them, there was always the possibility that end users could also be working in them -- so when the next replication happened, we'd get lots of rep/save conflicts. A definite no-no.


1  ·  2  ·  3  ·  Next »
Other articles you might like
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
Home > Strategies > Document Management (11 articles)
   Understanding Domino.doc end-of-life options
   Integrating a Notes Connector database with Google Enterprise Search
   Integrating Notes content with Google Enterprise Search
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 --

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

Want The Top Lotus Experts By Your Side Without Paying Hefty Consulting Fees? Look No Further.
Like having a team of consultants by your side -- ones who have all the answers and never make mistakes -- THE VIEW gives you immediate access to field-tested instruction, guidance, and best practices from the brightest Lotus professionals around.

Join your peers who realize their Lotus technology is too important to let people from blogs and forums tell them how they should implement it, run it, and use it. THE VIEW is where only the world's top Lotus experts provide validated support to you on a weekly basis to ensure you work more efficiently, get more out of your Lotus technology, and stay clear of costly mistakes.

Check out the new instruction, tips, and best practices added to THE VIEW this week.

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