aus meiner Grabbelbox:
The FolderReferences property of the NotesDocument class
is a new R5 property that will return a list of all the
folders a document is a member of. It's particularly useful
in mail databases when you need to determine what folders a
document belongs to. However, to use this property, there
are three requirements:
1. ($FolderInfo) view. This view is provided in the standard
R5 Notes mail template.
2. ($FolderRefInfo) view. This view is provided in the standard
R5 Notes mail template.
3. db.folderreferencesenabled := true
The third requirement, setting the db.folderreferencesenabled
flag requires you to write a bit of LotusScript to set this
property:
Sub Initialize
Dim session As New notessession
Dim db As notesdatabase
Set db = session.currentdatabase
If Not (db.FolderReferencesEnabled) Then
db.FolderReferencesEnabled = True
Print "DB Folder References has been enabled."
Else
Print "DB Folder References has already been enabled."
End If
End Sub
Once the three prerequisites are in place, you can begin
using the folderreferences property. However, keep in
mind that if you apply the three prerequisites (above)
to an existing db, the folderreferences property will
return NULL for these documents. This is because
folderreferences are set only after the three
prerequisites are set AND a document is moved into a
folder. If you look at the document properties for a
document, you will see that there are three fields:
$FolderRef, $FolderRefFlags, $FolderRefID. This means
that the folderreferences property will evaluate correctly
for this document.
If you have an existing Domino databases containing documents
that you want to start using folderreferences in, the best
solution is to write a small LotusScript program to process
each document in each folder of the db and "re-add" that
document to the folder. This will create the three internal
fields ($FolderRef, $FolderRefFlags, $FolderRefID) that Notes
needs in order to calculate the folderreferences property.
hth
Thomas