Hi scott..
I did as what you advised me, but it produces error..
"Error parsing included template tblDsMaster.ftl Encountered "EntityExpr" at
line 19, column 82. Was expecting one of: ".." ... "=" ... "==" ... "!=" ...
... ... ... ... "," ... ")" ... ">" ... ">=" ... "." ... "[" ... "(" ...
"?" ... "+" ." etc
As I wrote before, I try to do this:
<#assign salesLevelsList = delegator.findByLike("SalesLevel",
Static["org.ofbiz.base.util.UtilMisc"].toMap("lob","A","channelCode","1",
"incentive","Y", "salesLevelId","%LC"),
Static["org.ofbiz.base.util.UtilMisc"].toList("salesLevelId","name"))>
and i use salesLevelList to do iteration and display the result in ftl:
<#assign iter=1>
<#list salesLevelsList as s>
.....more codes
<#assign iter=iter+1>
</#list>
Scott Gray wrote:
>
> Hi Nashrul
>
> Try this:
> delegator.findByAnd("SalesLevel", UtilMisc.toList(
> new EntityExpr("lob", EntityOperator.EQUALS, "A"),
> new EntityExpr("channelCode", EntityOperator.EQUALS,
> "1"),
> new EntityExpr("incentive", EntityOperator.EQUALS,
> "Y"),
> new EntityExpr("salesLevelId", EntityOperator.LIKE,
> "LC")));
>
> Regards
> Scott
>
> On 16/08/07, nashrul <[EMAIL PROTECTED]> wrote:
>>
>>
>> Can we use method in GenericDelegator that does query using both 'and'
>> and
>> like operator...
>> I have a table Sales_Level which contains fields SALES_LEVEL_ID, NAME,
>> DESCRIPTION, LOB, CHANNEL_CODE, and INCENTIVE. i want to select sales
>> level
>> with lob=A, channelCode=1, incentive=Y, and salesLevelId like LC.
>> --
>> View this message in context:
>> http://www.nabble.com/query-combining-and-and-like-tf4278148.html#a12177156
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/query-combining-and-and-like-tf4278148.html#a12177860
Sent from the OFBiz - User mailing list archive at Nabble.com.