Updating view properties thru Script

I have a database with 40-50 views. I’d like to write a one time program to change their discard frequency and set the refresh to manual (it’s an archive database, and I’d like to save some space).

Is there any way to change these view properties via Lotus Script?

Thanks.

Subject: RE: Updating view properties thru Script

It’s kind of a kludge but it can be done.

If you make this change manually, then use the Design Note properties dialog to compare the items in the design note before and after, you can see the difference is an item called $Index, which is blank if you use the default settings, and contains some characters if you change the setting. E.g. “/O/P=168” means Refresh=Automatic, Discard index if inactive for 7 days (looks like the measurement is really in hours).

So, use NotesNoteCollection to find the design notes of the views you want to change, open each of them as a NotesDocument, and update that item. Notice that the item is signed, so it should still be signed when you’re done (NotesItem.IsSigned property), and you should call the Sign method before saving the note (or re-sign the whole application when you’re done).

  • Andre Guirard, IBM/Lotus Development

Useful blog: Best Practice Makes Perfect

For faster answers, be C R I S P Y

Subject: RE: Updating view properties thru Script

Andre,Thanks!