Selecting multiple documents with code

Is it possible ?The SelectDocument method in the NotesUIView class doesn’t seem to be able to do this. It only selects one document.

I tried to run a loop on this but only the last document in the loop got selected.

What I am trying to accomplish is the type of selection you can do manually by clicking in front of the documents you want to select.

Subject: Selecting multiple documents with code

There is no way to directly control the checkmarks in the selection margin of a view, except to deselect all (NotesUIView.deselectAll).

The only hack that I know of to achieve what you want, is to write write the noteID/UNID (or other unique key) of the documents that you wish to select, to an environment variable or profile document (multi-value), and then trigger a Formula agent, set to “Select documents in view” that reads the above document keys and performs an appropriate

_keys := ;

SELECT _keys = ;

This agent will select any documents where matches one of the entries of _keys.

Note that @NoteID and @Text(@DocumentUniqueID) has slightly different formats to their LotusScript counterparts notesDocument.noteID and notesDocument.universalID, so you have to reformat to compare.

Subject: RE: Selecting multiple documents with code

Thank you for your response.I’ll try this out :slight_smile:

Regards,

Oskar