Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Deleting 'Sent' items NOT in other folders

Posted on 2000-03-17
10
Medium Priority
?
289 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 3
10 Comments
 
LVL 9

Accepted Solution

by:
Arunkumar earned 2000 total points
ID: 2630532
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
ID: 2636024

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
ID: 2639571
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 7

Expert Comment

by:frache
ID: 2639888

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
ID: 2639892
Note:
To create new database you can use replication process.
0
 

Author Comment

by:mwking
ID: 2640457
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
ID: 2640776
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
ID: 2642868
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
ID: 2649716
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
ID: 2660378
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

705 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