I would like to build a view that only shows the latest document for each category. Does anybody know if this is possible? I’ve had no success…
Subject: I know of nothing built in…but you can try some scripts.
I don’t think there is anything specifically by design, however, you possibly can create postsave scripts that sets a flag to the document that should be in your “categorized view”.
This agent can do a NotesDatabase.Search based on documents for that category, iterate through the documents, set a field to “1”, and clears that field on the other documents if set. This may cause a few seconds each time the user saves, but it can maintain a consistency.
Another approach is use a folder instead of a field/view–that way your agent is not touching each document. In the folder, you can pull out all of the documents in the found search, and only put in one.
If you go this route, I would also add an agent that will rebuild your view/folder in the event that the LotusScript events stopped executing due to computer disconnect or other issues. Maybe a clever user messed up your flagging by removing the documents from the folder, or messed with your flag. You can run this manually, monthly, weekly, or nightly depending on your needs.
Sounds like work, but I don’t think it will take more than 1 hour. Once you are done, you can use it other applications.
Keep in mind that your cleanup agent may be good in a highly replicated environment. In such cases, it may require a more thorough planning.
-Kyle Huang