1
votes

I am developing a database on Lotus Designer 8.5 environment with LotusScript and LotusFormula.

Is there any possibilities on get a list of recently opened documents (for example last five) in a Lotus Notes database ? My purpose is to provide an embedded view showing the recent documents opened by current user on the current database, which will act like some kind of history view.

Please advise

2
You can use the notes.ini to store the UNIDs of the last five documents which were opened by the user and in the view only show documents which UNID is member of the 5 saved UNIDspoisonedYouth
it might have a little bit complicated view selection formula.anevil
You only have to append @IsMember(@Text(@DocumentUniqueId); yourList) to the view selectionpoisonedYouth
This would work on local databases only, not on server.Knut Herrmann

2 Answers

5
votes

Use a folder categorized by username. Add the current document in PostOpen event to folder with document.PutInFolder(folderName) and remove the oldest document from folder with document.RemoveFromFolder(folderName)

This way you don't need to edit the documents and can show the last visited documents for a user in an embedded view.

As an alternative you can use user specific folders with option "Shared, private on first use".

1
votes

I have that functionality in one of my databases. I just added some code in the QueryOpen event of the form to store the UNID of the document in a profile document linked to the specific user. The values are stored in a multi value field, and my code removes the oldest entry when the number of entries I want to store is exceeded. The user can actually set that number themselves in teh applications settings, 5 is default but they can make it more or less.

I built a class for this, makes it very easy to modify later, and to implement it in different forms, for different document types.

I then built a method to expose the last documents to the user, using a dropdown box as you can see below. Since you only wwant/need the five (or perhas ten) last documents, no need to use a view.

enter image description here