Lotus Notes view to show all documents older than X Days

Posted on 2010-01-01
Last Modified: 2013-12-18
I created a new view in Lotus Notes 8.5.1 and copied the select criteria from "All Documents" view($All). I called the view "To be deleted". I modified the folder column on this view to allow users to Sort By Folder (Which folder the document is part of)

My question:
Please help me modify this view(selection criteria) to ONLY show all documents older than 80 days from the date they were created. Or create an agent that copies all documents older than 80 days to this view. This view should also EXCLUDE documents in a folder called "Retention" and its sub-folders.

I have agents that will delete all the documents from this view if the doc is older than 90 days. So Users will have 10 days to move documents from this view to folder called "Retention" if they do not want them deleted.

Any help is appreciated. Doesn't matter if done using Lotus Script or Formula language or anyway else.
Question by:LotusNAdmin

    Author Comment

    bumped to 500 points
    LVL 46

    Expert Comment

    by:Sjef Bosman
    That view based on "Older than X days" is not a good idea. Views based on @Today or @Now should be avoided, for they require a complete refresh each time they're visited. In this case it won't do much harm, for the view would be small and it's in one person's mail database, but you can do without it. Anyway, if you want to conserve space, it is much easier to use Notes' standard archiving. And much more user-friendly.

    Read this document first, it's from the Admin Help database: "Mail archiving and policies"!OpenDocument

    If this standard, no-coding-required approach isn't enough, and you really want the view or folder To Be Deleted, how about this scenario:
    - create an agent that runs every night, on all documents
    - if if finds a document older than x days, it attaches the document to the ToBeDeleted folder
    - it also adds a field called ExpireDate, with a date-value of x+10
    Archiving can be configured so that it only archives documents that are marked expired, i.e. that have a field ExpireDate.

    I'd skip the whole idea of retention, if you use archiving. If they want, they can always find a document back in their archive. I'd also skip the agent, for the same reason: mail isn't lost, just elsewhere. The advantage of an archive database is that the size of most views will be 0, because they are rarely used. After 45 days, the index of a view is discarded by the server.

    If you expect huge archives, you could add a separate disk for the archives, and add a redirection-file, to redirect the complete archive directory to a different disk. But that's a different topic.

    Author Comment


    the management understands the view will take a while to load. This view is only for the legal department in our company (11 users) for whom archiving is disabled through policies. They should not have any email older than 90 days unless its absolutely required for legal purposes.

    what is the code to find documents older than 80 days? and show in this view
    How to exclude documents in the folder "Retention and subfolders" from this view?
    How to create a new field called ExpireDate = date created + 90? code or steps please

    My plan is to create a view that shows all docs older than 90 days (exclude docs in folder "retention" and its subfolder). Add field called expire date (@created + 90). Show expire date in a column in the view.

    I am a notes admin with very little experience in development. Also i prefer the view if possible and not a folder. Thank you.
    LVL 46

    Accepted Solution

    > what is the code to find documents older than 80 days? and show in this view
          @Select Form="Memo" & @Adjust(@Created; 0; 80; 0; 0; 0; 0)<@Today

    > How to exclude documents in the folder "Retention and subfolders" from this view?
    That's very hard to do, if not impossible, without the use of an additional field in the document. In a view, it is impossible to use information from another view. The formula with the new field could be:
          @Select Form="Memo" & @Adjust(@Created; 0; 80; 0; 0; 0; 0)<@Today & Retain=""
    So you need to add this field when a document is moved to the Retention folder, either using an action or automatically, using a scheduled agent.

    > How to create a new field called ExpireDate = date created + 90? code or steps please
    That would only be useful when you use standard Notes archiving. You don't need the field, the view formula would be little different from the formulas I already gave. Or do you intend to use archiving for "the last step"? In a formula agent, the code would be:
          Field ExpireDate:= @Adjust(@Created; 0; 90; 0; 0; 0; 0);
    Don't forget to remove the field when a document is retained.

    Author Closing Comment

    Sjef: thanks for the solution, it should be perfect
    LVL 46

    Expert Comment

    by:Sjef Bosman
    I sincerely hope it works as designed, though I have some doubts... Keep me posted!

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
    This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
    This video discusses moving either the default database or any database to a new volume.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now