Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a Notes View via code

Status
Not open for further replies.

LeanneGodney

Technical User
Mar 7, 2002
175
GB
Hi there,

I have a very big notes database that has specific static views that people use. Trouble is I'm battling to create a NotesViewEntryCollection for only the data I'm interested in. It all depends on how the view has been categorised, I've noticed.

Does anyone know how to create a local view (for only that user) via code? I'm using VBA in Access to do this, but if you only know the code within Notes then that would also be helpful. All i want to do is filter ALL DOCUMENTS in the database to show a specific region. I can create this view manually in Notes, but I want my database to work on multiple machines and therefore will need to to set the local user up with the view needed.

So my questions are this:

1. Does anyone know how to create a local view in Lotus Notes using code?

2. If that fails, does anyone know how to create a NotesViewEntryCollection that ignores the categories in a view and simply grabs ALL DATA for a particular region.

Thanks!

Leanne



 
Why don't you create another view sorted by region ?
That way you could use GetAllEntriesByKey using the region, and your collection would be done.
Otherwise, you simply have to cycle through all the documents in the view and manually add the ones you want to the collection.
Creating the view is simpler.

In R6, the NotesView object includes a method named CreateColumn. Therefor, theoretically you could create a new view, create columns in the order you want, then use the NotesViewColumn object to set the various properties.

Pascal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top