Expand my Community achievements bar.

Elevate your expertise and be recognized as a true influencer! Nominations for the exclusive Adobe Community Advisor program 2023 are now OPEN.

TaskSearchFilter.addCondition IN operator


Level 2


I have a question regarding TaskSearchFilter.addCondition() method


How to use this method with operator "IN" (Operator.IN) ?

Let's say we what to list all task with status assigned (3) or deadlined (101) (sum of sets).

How to add this condition using TaskSearchFilter ?


tsf.addCondition(TaskSearchingConstants.pSTATUS, Operator.IN, <WHAT HERE>, Connective.AND)


What should be in place of <WHAT HERE>?

An array of Strings {"3","101"} or ints {1, 101}?

Or maby List of Integer obecjt ?

Please do not post solution :

tsf.addCondition(TaskSearchingConstants.pSTATUS, Operator.EQUALS, 3)

tsf.addCondition(TaskSearchingConstants.pSTATUS, Operator.EQUALS, 101, Connective.OR)

I'm interested in solution with collection of values and "IN" operator.

0 Replies


Level 2

I done some tests and

there are two solutions

String [] arr = {"3", "101"};

tsf.addCondition(TaskSearchingConstants.pSTATUS, Operator.IN, arr, Connective.AND);

and second

int [] arr = {3 ,101}

tsf.addCondition(TaskSearchingConstants.pSTATUS, Operator.IN, arr, Connective.AND);

Both are working well....