Search DominoPower's 11,441 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.
The strange case of Last Modified dates (continued)

So we started to look a bit deeper into how we could get around this.

We first looked at the LotusScript NotesDocument.LastModified property, and we found that to indeed be the Last Modified in this file value. But, of course, there is no way to get that value surfaced in a view column. So we could scan the whole database to check each document for this value -- but when the database might have tens of thousands of documents in it, that would take more time than we wanted to spend.

But, it was a clue that we came back to later.

I suppose we could have created a "last edited" field on all the forms, and populated that in QuerySave, but we'd also have had to ensure that agents which also run on the documents kept it up to date. All that was a no-no in the timeframe that we had, and I'm not sure that it could be made fully robust.

Next, we looked at the $Revisions field, but this was a no-go as well. Not all documents contain a value in this field -- it seems that it is only set by a Notes client Save action when the document is being updated. It isn't set by the initial write, nor is it updated by any agent action. And when there are values in the field, there can be a large number of them, and we found also that the dates and times in these values could not always, or indeed often, be reconciled with the dates in the properties box.

Then we checked the @Modified function, and found that it returns the Modified Initially value, so that was no good. Note, by the way, that @Modified is only guaranteed to work properly in view columns -- it is documented that it returns the next-to-last value when used elsewhere.

Now isn't that odd?

We also noted that a column with the formula @Modified gets it replaced with the simple function Last Modified, so these are actually one and the same function.

We then went back to the View in Designer, and tried the column property Last Read or Edited. That gives the Added to the File value. Still not what we wanted, and we thought that using the Added to File date as the Last Read or Edited was a bit odd. We also found that this was identical to the @Accessed value. The documentation says that this value does not replicate, and is maintained in each database. It also says that for read accesses, it's only accurate to the date -- the first access sets the date and time, but subsequent reads on the same date don't update this value. So that date can't be relied upon at all for what we wanted.

Which brought us back to the Script NotesDocument.LastModified property. Was there a way that we could use the value from this to detect documents that had changed since a given date and time, without scanning all the documents in a big loop?

It turned out that there is. And, better, it's quick.

NotesDatabase.Search was the answer. The second parameter of this call is a cut-off date, for documents new or modified since that date, and it turns out that this date does indeed filter the NotesDocument.LastModified value. The search, using "@ALL" as the search string, is fast, too, because it just includes into its result set all the documents in the database, and then filters out those not changed after the cut-off date.


« Previous  ·  1  ·  2  ·  3  ·  Next »
Other articles you might like
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
Home > Strategies > Document Management (14 articles)
   An application for scanning physical mail and distributing it virtually
   Evaluating your Domino Document Manager (Domino.Doc) transition options
   What to look for in a Domino-based document management solution
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
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
2010: A Lotusphere of change
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: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Find unused Lotus Notes groups and clean up your address book
Have you ever wanted to get rid of old Lotus Notes groups that were cluttering up your address book, but you weren't sure if they were used? Find Unused Groups can help.

Find Unused Groups will check your ACL, mail, multi purpose and server groups to help you determine if they are used, and who uses them.

Learn how to easily clean up your address book.

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