Solved

Mail in what folders(s)?

Posted on 2003-11-17
10
486 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
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
 
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Word Pro Conversion utility 13 35
Domino not switching to TLS 1.0 4 785
Domino Server 11 69
IBM Lotus notes 9 93
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

810 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