Solved

Mail in what folders(s)?

Posted on 2003-11-17
10
485 Views
Last Modified: 2013-12-18
Hi

How can I add a column that shows what folders the different mails are stored in?

I'm using Notes 4.6.7
0
Comment
Question by:klunde
  • 5
  • 3
  • 2
10 Comments
 
LVL 31

Expert Comment

by:qwaletee
ID: 9764181
First, you need to enable IMAP-compatible folder handling.  To do this, run the server CONVERT command with the -m paraneter against the mailbox, e.g., LOAD CONVERT -M mail\klunde.nsf

0
 
LVL 2

Expert Comment

by:ksi2001
ID: 9764193
Interesting task. But you cannot do it in a column formula. The only way is to write this information into the document, which is probably could be done at postdragdrop event of the database, and in every part of code where you are moving documents to folders.
0
 
LVL 2

Expert Comment

by:ksi2001
ID: 9764263
Or and there is an event QueryAddToFolder  for the views and folders which is exactly what you need.
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9764332
But that only soves half your problem; the other half is even more diificult.

When IMAP references are enabled, the following additional features are available for each document:

1) When accessed via NotesDocument (or lotus.notes.Document), there is a property called FolderReferences.  This property is an array of strings.  The strings are folder names.  But there is no equivalent @Function or field

2) There are three special fields on teh document $Folder, $FolderRef, and $FolderRefFlags.  $FolderRef is the source of information for FolderReferences.  But, while FolderReferences contains view names, $FolderRef does not. Instead, it is a text list of folder UniversalID strings, the 32-hex-digit internal key of a folder's design record. FolderReferences is "nice enough" to look up taht information for you.

3) Two special views are added.  One, ($FolderRefInfo), is all the document categorized on $FolderRef.  the other view shows a list of all folders, with two columns.  the first column is the folder's UNID, the second column is teh folder's name.  the first column is sorted.
0
 
LVL 2

Expert Comment

by:ksi2001
ID: 9764406
qwaletee: in order to use these properties klunde should upgrade to R5

0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 31

Accepted Solution

by:
qwaletee earned 50 total points
ID: 9764412
Now, how do you put it all together?  The view column can't make use of FolderReferences, because it is a property of the object model, while columns onlyhave fields and @functions.  The only field it has is $FolderRefs, and that would work, except I'm sure showing the folder UNID instead of its name is unacceptable.

So, what can you do?  There are two ways to handle it.

1) Don't show a column.  Instead, add a view action taht when clicked displasy teh highlighted document's folders.  the following code wuld do the trick:
Dim s as new notesSession
If Not s.currentdatabase.folderreferencesEnabled Then
  Msgbox "This database does need CONVERT -M before this feature will work"
  End
End If
Dim folderList as string
Forall foldername in s.DocumentContext.folderReferences
  folderList = folderList & Chr$(13) & folderName
End Forall
If folderList = "" Then
  MsgBox "No folders for this document"
Else
  Msgbox "Folders:" & folderList
End If

2) You can run code on your documents that will add a field to the document conatining the folder name. the code is fairly simple -- similar to teh code above.  But...
a) it would have to be run as an agent against all existing documents
b) it would have to run against all messages when they arrive
c) you would have to add it in to all the Move to folder objects and Add to folder events
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9764417
No, they are available in 4.6 as well.
0
 

Author Comment

by:klunde
ID: 9769584
This looks very promesing!

But a slight problem. My Notes states that .folderreferencesEnabled is not a member of this class.
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9773477
Hmm... folder references might have been added to the object model in 5, I'll have to check.  But the $Folder field hs been there since 4.5 or 4.6 for sure.  You can see this if you have it enabled for your malbox.

Here is sample code that would be the equivalent if you cold not use folder references in the object model...

**** Instead of:

Forall foldername in s.DocumentContext.folderReferences
  folderList = folderList & Chr$(13) & folderName
End Forall


**** Use:

Dim folderNames List as string, folderName as string, folder as notesDocument
Forall folderID in s.DocumentContext.~$FolderRef
  If IsElement(folderNames(folderID)) Then
    foldername = folderNames(folderID)
  Else
    set folder s.currentDatabase.getDocumentByUNID(folderID)
    foldername = folder.~$Title(0)
    foldernames(folderID) = folderName
  End If
  folderList = folderList & Chr$(13) & folderName
End Forall
0
 

Author Comment

by:klunde
ID: 9777002
This works!
Great! Thanks!

(after changing to "set folder = s.curr.....")
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now