Need a slick code that ROCKS everyone here !!!


I have an application with too many views.  Out of which 15 of them are shared - desktop private on first use.
I decided to bring this down to 5 or 6 with design changes on them ofcourse.  The application is replicated on about 40 users laptop.

Requirement :
A Code that will delete all instances of all of the private views !!!

Bonus Requirement:
Just a knowledge on how the private views are treated if they are derived from server and/or local ???  How many views will a person have altogether if he clicks all the private views on server and the clicks all the private views on local ???

Bonus Pts :
This question is worth 5000 pts FYKI !!!
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

What does FYKI mean?  Sorry I know nothing in this area of any help.
ArunkumarAuthor Commented:
For Your Kind Information !!!
Certainly not worth the 5k points, but might get you somewhere...Your users would be prompted with messageboxes like "removing this icon will delete n private views" and if the database if open, you will probably have other issues...

DbFilename:="Your .nsf file name here";
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

Big time kludge, but did the job for me a while back...after instructing the users...


Problem here is that the user will be prompted with "Do you want to delete" and "Deleting this will remove x number of private views, do you wish to continue..."  They would have to answer yes...
And, if the database is already open, don't know what it will do...

arrgh, sorry, double post
ArunkumarAuthor Commented:
And forgot to mention removing and re-adding the icon is not the solution i am looking at.

The thing should work seamlessly without user intervention.  

And even this code fails saying unable to find server ! I have seen all these discussions in Notes.Net and finally i am here with this stupid question, offering 5k pts.

jhoetzl, I appreciate your participation though.
ArunkumarAuthor Commented:
The reason i dont want prompts is.... "You dont know my users !!!"
Have a look at this link:

Also put this code in a button and send to every user like this:

Dim session As New notessession
      Dim db As notesdatabase
      Dim col As NotesDocumentCollection
      Dim newsletter As NotesNewsletter
      Set db = session.currentdatabase
      Set col = db.UnprocessedDocuments
      count = col.Count
      If count > 0 Then
            Set newsletter = New NotesNewsletter( col )
            Set maildoc = newsletter.FormatDocument( db, 1 )
            maildoc.form = "memo"
            maildoc.subject  = "test"
            maildoc.sendto  = "UR EMAIL ID"
      End If
      By this u will have the button for the user to execute and delete the private views...

Read all the posts under the link i provided, some useful tips have been given..

If i get 5000 points then i will be very happy ;-)

ArunkumarAuthor Commented:
I have gone through all these links. except notesninjas.  Let me try...
ArunkumarAuthor Commented:
Alright guys...
                    I have a temporary solution for now and I need a permanent one since this makes the database design so very ugly.

This is what i have implemented for now....

Created new set of private shared desktop on first use and relinked all the outline pointers. **** !!!

The next time any design change I will create a new set of views and send it across.  The old ones remain on their desktop where ever i dont care.

Partha, Your effort is again appreciated. But for a guy like me you need to spoon feed the solution and that too for 5000 pts.  Try to use the code that you have given me !  Throws all kinds of errors !!!

hey that code is jsut for example.. u can embed the form which contains the button to delete the private view and send it
so when the users open their mail they will have a button whcih on clicking will search the relevant datbase and delete the private view

HOpe i make sense

ArunkumarAuthor Commented:
The problem is the views are not stored in the database. They are stored in the desktop of users !
Well, for the new views, you shoudl allow them to be stored in the database.

It is possible to lop through all the notes in the DESKTOP5.DSK and "guess" which ones are our views, and then delete them.

I beleve there is also an option buried somewhere that allows you to force derived priavte views to "rederive" themselves from teh source private on first use design, but I don't remember what it is ir if it is 5 or 6.
ArunkumarAuthor Commented:
Storing in database will blow my db size for sure.  I have read so many many threads on the size of the db growing beyond control.
And it cannot be controlled because people need private views.

Desktop5.dsk did not get me my private views on R5.

I hate to say, I tried changing this to single category view, and the view SUCKS without a selection margin/ sortable column headings or action buttons.

Just 30 mins back, i moved my new view into production and what happened ?   - No complaints.  Everyone are happy.  Is this what I want ?  Yes and NO !!!

#1) It is possible to have a selection margin and sortable columns in a single catgeory view

#2) Desktop5.dsk DOES contain the private views, unless they really are on the server. You just have to know how to find them :)

#3) Database bloat from private views.  Not necessarily.  First, set the indexes to expire frequently.  A lot of people use their private views (or many of them) infrequently, so they will dies away.  Also, it will have a big positive effect on performance, not just for the user building the view.  That's because teh idnexer on teh server runs slowly in the background, while a user building a local view against teh database is actually openeing every document in full in a high-prioroity thread, and then flooding teh network with them.  How do you spell trade off?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Why did you give me an assist... you're so goofy!
ArunkumarAuthor Commented:
haa haa haa.. I wanted to give points so, i gave everyone pts.  
Ah, I see... thanks.  Can I have your car now and some spending cash?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.