Hallo all I need to determine which entries (categories and documents) are selected by user (I use it in the view‘s action button). I thing there have to be some way when the Notes Client in the Status Bar shows how many entries (documents) are selected actually.
Because all entries are unique it helps me if I obtain a text (like command under Edit | Copy Selected as Table or export view into text file File | Export). I want avoid using PickListString modal dialog
Subject: How determine user’s selection in the view?
Look at the NotesUIView class. There are some methods and properties in there which will help you.
Also, if you are coding an agent that runs on selected documents, NotesDatabase.UnprocessedDocuments will return a NotesDocumentCollection object which represents all documents selected at the time the agent was invoked.
Subject: How determine user’s selection in the view?
I need to determine which entries (categories and documents) are selected
You can get the documents through notesuiview.documents, but it is not possible to determine under which categories those documents are selected. Strictly speaking, if a document is categorized under A B and C, selecting it under A also makes it appear selected under B and C. But it is not possible to determine which category the user actually clicked under.
Subject: RE: How determine user’s selection in the view?
Thanks for your reply. It’s a good idea but it works only if the user selects the documents directly. My goal is to catch user’s selection not only for documents but for collapsed categories as well <= looks that Status Bar indicates this event correctly.
Subject: RE: How determine user’s selection in the view?
Hallo Thomas As it looks you have some idea how reach my goal - determine which documents and categories was picked by user in the view. Can you write piece of code how to do it? There is no problem to build collection of documents through UI but there is problem for categories?..
Subject: RE: How determine user’s selection in the view?
There is only one function that associates tthe location of the user selection with the category – CaretCategory. In all other cases, no distinction is made as to which category the entry the user actually made his selections in – if you check the selection margin of the view, ALL of the entries corresponding to a given document will show up as selected. In other words, the user is selecting documents, not lines in a view. It’s easy enough to determine ALL of the categories to which a given document belongs (just read the first column of the NotesViewEntry), but there is ABSOLUTELY NO WAY to determine where the user made the selection in the UI if there is more than one view line (the current caret line) selected.