Thank you Jacques! I think this will help.

Martin


On 4 March 2013 23:54, Jacques Le Roux <[email protected]> wrote:

> delegator.findByAnd("Person", using like  on both Person fields
>
> Have a look at PartyServices.findParty(), notably those lines
>
> // filter on firstName
> if (UtilValidate.isNotEmpty(firstName)) {
>     paramList = paramList + "&firstName=" + firstName;
>
> andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("firstName"),
> EntityOperator.LIKE, EntityFunction.UPPER("%"+firstName+"%")));
> }
>
> // filter on lastName
> if (UtilValidate.isNotEmpty(lastName)) {
>     paramList = paramList + "&lastName=" + lastName;
>
> andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("lastName"),
> EntityOperator.LIKE, EntityFunction.UPPER("%"+lastName+"%")));
> }
>
>
> It'a bit out of context, but if you want more, you might be interested by
> https://issues.apache.org/jira/browse/OFBIZ-5042
>
> Jacques
>
> From: "Martin Kaiser" <[email protected]>
> > Hi all,
> >
> > I have a short question: Is it possible to do a full text search on
> > multiple fields, e.g. firstName and lastName on Person entity? How can
> this
> > be done?
> >
> > Thanks & best regards,
> > Martin
> >
>

Reply via email to