So it's not some SQL union but rather just a simple "OR" instead of "AND"
for some conditions.

I was actually thinking of this problem recently but not only for two
options but rather multiple options.

To be more specific, our drop-down form widgets have an attribute
"allow-multiple" or something like that which yields a list of values. This
cannot be currently handled by performFind and the other related search
services. So I think having an automatic "OR" on multiple dropdown values
is an important feature to implement and I would give that a +1.

On Feb 2, 2018 11:44 AM, "gil portenseigne" <>

Yes, actually using form widget with performFind services do not offer a
way to union two search criteria.

Exemple : i want to find all communicationEvent that are in Bounced status
*or* that contains something in note field. (very specific, strange, thats

By default all search criteria are managed in EntityCondition like :

List<EntityCondition> allDefaultSearchCriteria =
UtilMisc.toList(criteria1Condition, criteria2Condition ...);

The resulting final condition would result as :
EntityCondition.makeCondition(allDefaultSearchCriteria, EntityOperator.AND)

With the enhancement, by regrouping two fields with field1_grp = 'groupKey'
and field2_grp = 'groupKey'

the following condition is added to the other default ones like :

tilMisc.toList(field1Condition, field2Condition), EntityOperator.OR));

I hope this will be clearer.

On 01/02/2018 21:07, Taher Alkhateeb wrote:

> Hi, perhaps if you share the idea of how to translate it to the entity
> engine conditions then we'd be better informed?
> On Feb 1, 2018 6:30 PM, "gil portenseigne" <>
> wrote:
> Hello,
>> In a customer project we met a very specific need in a search screen that
>> offer search criteria that must unions and not intersect.
>> I propose this improvement in OFBIZ-10195, but
>> i'm wondering if any of you ever met such need ?
>> Is that worth to be commited in the code base ? I tend to say yes, but i'd
>> like to hear the community out about this.
>> Thanks !
>> Gil

Reply via email to