Solved

Deleting 'Sent' items NOT in other folders

Posted on 2000-03-17
10
281 Views
Last Modified: 2013-12-18
Is there an elegant way to identify items in the sent mail that are not in other folders?   If an item is put into another folder from the 'Sent' folder, and the item is deleted from the sent folder, the 'copy' in the other folder also disappears.   I assume that that is because only a link is set up between the base item and the folder.

Would like to reduce the size of the 'Sent' folder to be only items that are 'stored' in other folders, or, alternatively, find a way to put an actual copy of the document into the folder, instead of a link, then we can delete all the items in the sent folder completely, until the next run of the cleanup.
0
Comment
Question by:mwking
  • 4
  • 3
  • 3
10 Comments
 
LVL 9

Accepted Solution

by:
Arunkumar earned 500 total points
Comment Utility
Hi mwking !!!

Here is a simple code to acheive your request.

1. Create a Shared Folder Named "Unique Folder" in your mail db.
2. Create an Agent that runs manually from actions menu and runs on selected documents.
3. Paste the following code in your Agent and save it.
4. Go to the sent Folder and select all documents (Ctrl+A).
5. Use Actions menu and Run the agent that you have created on the selected documents.
6. Watch for the status bar for the script completion.
7. Open the "Unique Folder" to find the documents that are found only in your sent box and not in any other Folders !!!!

Here is the Code for the Agent.....

===========================
     Dim ss As New notessession
     Dim ws As New notesuiworkspace    
     Dim db As notesdatabase
     Dim view As NotesView    
     Dim doc As notesdocument    
     Dim tempdoc As notesdocument    
     Dim swapdoc As notesdocument
     Dim dc As NotesDocumentCollection
     Dim Ctr As Double
     
     Set db = ss.CurrentDatabase
     Set view = db.GetView("($Sent)")
     Set dc = db.UnprocessedDocuments
     
     Set doc = dc.GetFirstDocument
     
     Ctr = 1
     
     Do While Not doc Is Nothing
          unid = doc.UniversalID    
          Flag = "NotFound"
          Forall fols In db.Views                                            
               If Not fols.Name = "($Sent)" Then                    
                    If fols.IsFolder Then                        
                         Set tempdoc = fols.GetFirstDocument        
                         If Not tempdoc Is Nothing Then
                              Do While Not tempdoc Is Nothing                              
                                   unid2 = tempdoc.UniversalID                              
                                   If unid = unid2 Then
                                        Flag = "Found"
                                        Exit Do                                                        
                                   End If                                                                                                                      
                                   Set tempdoc = fols.GetNextDocument(tempdoc)
                              Loop                                          
                         End If                        
                    End If                    
               End If                        
               If Flag = "Found" Then
                    Exit Forall
               End If
               
          End Forall                    
         
          If Flag = "NotFound" Then
               Call doc.PutInFolder("Unique Folder")              
               Print Ctr & ". document(s) Put in Unique Folder"
               Ctr = Ctr + 1
          End If
         
          Set doc = dc.GetNextDocument(doc)
     Loop
     
     If Ctr = 1 Then
          Print "All the selected documents are found to be in one more folder(s)"
     Else
          Print "Successfully transferred " & Ctr - 1 & " documents to Unique Folder"
     End If
===========================

Cool Ain't ???

Good Luck !!!

-Arun
0
 
LVL 7

Expert Comment

by:frache
Comment Utility

Lotus notes is a Database. Folders are the result of particular query ...It's a view ... When you delete a message , you delete data ...


sent = all data sended
received = all data receive
forum = all messages with response(s)
-> don't touch ...

You can transfer data in another database but I think is a bad way.
0
 
LVL 9

Expert Comment

by:Arunkumar
Comment Utility
Hi Frache !!!

I'm sorry. I did not get you at all.
Could you be more specific and elaborate on your comment ???

Thanx

-Arun
0
 
LVL 7

Expert Comment

by:frache
Comment Utility

Lotus Notes is a database "like" Access  ,SQL server, or Oracle.
Each user have a little database who contain all messages.
With a database when you want obtain (extract) data, you make a query.
When you click on sent folder, you execute a query.
When you click on received folder, you execute another query.
A "view" is a particular query.
"sent" folder is a view.
"received" folder is a view.
"all messages" is a view
etc ...
With a view you see a part of your database.
When you create a new folder you create a new query = a new view. Not a "real" folder.

When you delete a message in a view you delete data in your database.

If you want duplicate data you must create a new database, and delete data after.
 
0
 
LVL 7

Expert Comment

by:frache
Comment Utility
Note:
To create new database you can use replication process.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:mwking
Comment Utility
Regarding the comment from 'frache':  Am aware that Lotus Notes/Domino is a DB.   The real issue is how to identify those items that are listed in the sent folder as being tagged into other folders/views, and to avoid deleting those that are tagged into other folders/views, thereby keeping those items that are, in the users eyes, worthy of keeping.
0
 

Author Comment

by:mwking
Comment Utility
On pasting the code into the agent, I get an error message regarding a formula error:
'An operator or semicolon was expected but none was encountered: ss'
referencing the first line of the code.

Did you test this yet??

0
 
LVL 9

Expert Comment

by:Arunkumar
Comment Utility
Hi MWKING !

Make sure that you paste the code in the script options initialise event.

I guess you are trying to paste
it in the formula event.

Good Luck !

-Arun




0
 

Author Comment

by:mwking
Comment Utility
Arun:

We are getting errors in the Script Initialise event.   Please review the code and let us know.   The strange stan-alone 'If' is flagged and the error posted is :
"Agentname: Initialize: 34: Unexpected En-of-Line; Expected : Expression"

If we remove the "If", we get a pile of mis-matched "End" statements.

I suspect that there is a condition missing in the version of the code posted above>

Thanks

Michael
0
 
LVL 9

Expert Comment

by:Arunkumar
Comment Utility
Hi Mic,

I have just checked the script that i have posted.

Check - manually from actions menu.
Run on - Selected documents
Copy the code to clipboard

paste it between the sub & End sub of the initialize event.

I did not get any errors and the code is perfectly workin.

All the loops and conditions are complete.  

Good Luck !

-Arun

0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 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

18 Experts available now in Live!

Get 1:1 Help Now