Search code examples
pythonlotus-noteslotus-domino

Pass a key-array to a Lotus-Notes COM method


I am trying to get a specific document from a Domino view. The view has 3 columns: Name, Surname, Age. The problem is, that Name is not unique, so I need to get the document that matches 'John' in the Name column (1st column) as well as 'Doe' in the second column (Surname).

So obviously the following won't work: doc = view.GetDocumentByKey('John')

There is a NotesView COM class which contains the .GetDocumentByKey() method, which allows one to enter a key array. But I am not able to enter a key array in Python.

I have tried the following:

doc = view.GetDocumentByKey('John Doe')

doc = view.GetDocumentByKey('John, Doe')

doc = view.GetDocumentByKey(('John', 'Doe'))

doc = view.GetDocumentByKey(['John', 'Doe'])

But none of them are able to get the needed document. What is the correct way to pass a key array?

EDIT: Solution found. There was a sorted hidden column with unique values that I ended up using.


Solution

  • Solution found. There was a sorted hidden column with unique values that I ended up using.