Categorised View

This is an old chestnut but I hope someone can help me to take it to one more stage.I have a view of contacts categorised by ContactPosition (Job Title) field.

I would like the user to collapse the view and then select (tick) the categories he requires.

An agent would then move all the contacts in the selected categories into a folder.

I can make this work for the currently highlighted category, but I need to be able to handle multiple categories.

Look forward to your ideas please. Thanks.

Subject: Categorised View

you can display a PROMPT_OKCANCELLISTMULT to user with choice list of categories so they can choose the categories they want to move. Then for each choice they made in the prompt, use getalldocumentsbykey to get the documents under those categories and move them

or embed the view in a form with a listbox field that has allow multiple values checked that uses @dboclumn to get list of categories for choices, users put a tick next to each category and click a button to run the agent. Again use getAllDocumentsByKey for each value selected in the field to get documents under that category

Subject: RE: Categorised View

Many thanks for your thoughts. Trouble with lists is that there are several hundred categories.The following code works in a view with the cursor on a category or on a document within a category. It just doesn’t allow one to select multiple categories. Anybody any ideas on that extra part? Thanks

Dim workspace As New NotesUIWorkspace

Dim view As NotesUIView

Dim category As Variant

Set view = workspace.CurrentView

'This is the view of contacts categorised by Job Title

category = view.CaretCategory





Dim session As New NotesSession

Dim db As NotesDatabase

Dim view1 As NotesView

Dim entry As NotesViewEntry

Dim doc As NotesDocument

Set db = session.CurrentDatabase

Set view1 = db.GetView("Contactdircorporatetitle")

'This is the view of contacts categorised by Job Title



Set vc = view1.GetAllEntriesByKey(Category, False)

Call vc.PutAllInfolder("Selection 1")

Subject: RE: Categorised View

I don’t see a way.