How to get documents from a view based on two keys

I have an XPage where I find all the child documents using the key view (first column) with a method called getAllDocumentsByKey. As a key, I use the parent's UNID. But now I have one more ChildType parameter, which can be equal to "Before" or "After". So I tried to solve it as follows:

var childType = viewScope['currentChildType']
var parameters = [parentDoc.getUniversalID(), childType]
allParts.getAllDocumentsByKey(parameters)

But this does not work (Vector is not the right object). When I try to find all the children with this:

allParts.getAllDocumentsByKey(parentDoc.getUniversalID())

It works so well.

In my view, 5 columns - the 0th - parentDocID, and the last is the type childType. How can I find it with two parameters instead of 1?

+4
source share
1 answer

, getAllDocumentsByKey() Vector

var parameters  = new java.util.Vector();
parameters.add(parentDoc.getUniversalID());
parameters.add(childType);
allParts.getAllDocumentsByKey(parameters);

: https://www.ibm.com/support/knowledgecenter/en/SSVRGU_9.0.1/reference/r_domino_View_getAllDocumentsByKey.html

+4

Source: https://habr.com/ru/post/1693362/


All Articles