Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I limit items in a view? Only most recent revision?

Status
Not open for further replies.

rphbrew

Technical User
Nov 30, 2002
40
US
I am using the Revision History forms (found on the lotus site) and as the revisions are saved they show up in the view.

I would like to have only the most recent version shown.

How do I do this?
 
If you are using revision history, you will have all revision documents show up in the view - unless you flag them somehow with a value that you can check in your selection formula.
In other words, when saving your current version, you need to include code that goes over the other versions and sets a value. That value you can then check in the selection formula of the view and not include those documents.
Whether you do this in the QuerySave event or in a triggered agent or in a scheduled one is up to you.
For example, if you use a scheduled agent to run every night, you could argue that all revisions made during the day will show up, and only the most recent will be available the next day.
That could remain useful since users could go back over whatever they changed during the day, retrieving deleted info if needed, and the next day most revision docs would be gone from the view.
You could even make a different "revision history" view that would include all revisions, thereby allowing users a complete view over all versions of the document.
Or you could simply delete all "old" revisions periodically, like once a week.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top