ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sanders, Brian" <BSand...@connextions.com>
Subject RE: entity-condition question
Date Mon, 01 Jun 2009 17:22:57 GMT
Your condition looks like: (firstName like "${parameters.name}%" ||
middleName like "${parameters.name}%" || lastName like
"${parameters.name}%") && socialSecurityNumber equals
parameters.socialSecurityNumber) 

You are ANDing the name conditions with the SSN condition when you
should be ORing. So, Adrian is saying that '<condition-list
combine="and">' should be '<condition-list combine="or">'

-----Original Message-----
From: Muhammad Aamir [mailto:mail@aamir.pk] 
Sent: Saturday, May 30, 2009 12:20 PM
To: user@ofbiz.apache.org
Subject: Re: entity-condition question

Hi Adrian, thanks for the reply but it makes no sense at least to me.

On Sat, May 30, 2009 at 12:54 AM, Adrian Crum <adrian.crum@yahoo.com>
wrote:

>
> Maybe your first condition-list element should be:
>
> <condition-list combine="or">
>
> -Adrian
>
> --- On Fri, 5/29/09, Muhammad Aamir <mail@aamir.pk> wrote:
>
> > From: Muhammad Aamir <mail@aamir.pk>
> > Subject: entity-condition question
> > To: user@ofbiz.apache.org
> > Date: Friday, May 29, 2009, 2:19 PM
> > If a I pass a social security number,
> > it doesn't bring any thing, however
> > searching by name works:
> >
> >         <entity-condition
> > list="parties" entity-name="Person">
> >
> > <condition-list combine="and">
> >
> > <condition-list combine="or">
> >
> >     <condition-expr field-name="firstName"
> > operator="like"
> >
> >         value="${parameters.name}%"
> > ignore-case="true" />
> >
> >     <condition-expr field-name="middleName"
> > operator="like"
> >
> >         value="${parameters.name}%"
> > ignore-case="true" />
> >
> >     <condition-expr field-name="lastName"
> > operator="like"
> >
> >         value="${parameters.name}%"
> > ignore-case="true" />
> >
> > </condition-list>
> >
> > <condition-expr field-name="socialSecurityNumber"
> >
> >     operator="equals"
> > from-field="parameters.socialSecurityNumber"
> > ignore-if-empty="true"
> > ignore-if-null="true"/>
> >
> > </condition-list>
> >         </entity-condition>
> >
> > Thanks
> > Muhammad Aamir
> >
>
>
>
>

Mime
View raw message