We would like to be able to create a view (in the mail database) that will display the name(s) of the folders into which messages have been filed so our end users can tell at a glance where a message is. I had thought of using @DBLOOKUP or @DBCOLUMN, but those are not available in Column formulae; nor is @COMMAND([DISCOVERFOLDERS]).
Write a scheduled script agent that stores the folders the document is in on a field on each document. Then create a view that displays that field. Place the agent and view in the mail template and propagate the design change to all user’s mail files. Make sure you read the help on the FolderReferences property of the NotesDocument object.
Sample agent code:
If Not(db.FolderReferencesEnabled) Then
Print “Folder references not enabled.”
Exit Sub
End If
Set col = db.Search(|Form*=“Memo”:“Reply”|, Nothing, 0)
If col.Count <> 0 Then
Set doc = col.GetFirstDocument
Do While Not( doc Is Nothing )
Set item = doc.ReplaceItemValue(“FolderList”, doc.FolderReferences)