Dev - DISTINCT parameter in performFind

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Dev - DISTINCT parameter in performFind

Alexandre Gomes-8
Hi all,

Is there a way to do a distinct performFind without changing the service
code?
(The reason behind this is that I'm using a view for searching
PartyClassifications with certain Parties but I just want the unique
PartyClassifications' details to show up in the result).

Thank you for your time,

Alexandre Gomes

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - DISTINCT parameter in performFind

David E. Jones

Use the service to create the find condition and then do the find  
using an EE call (which you can even do in screen defs or whatever).

-David


On Jan 16, 2006, at 5:25 PM, Alexandre Gomes wrote:

> Hi all,
>
> Is there a way to do a distinct performFind without changing the  
> service
> code?
> (The reason behind this is that I'm using a view for searching
> PartyClassifications with certain Parties but I just want the unique
> PartyClassifications' details to show up in the result).
>
> Thank you for your time,
>
> Alexandre Gomes
>
>
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Dev - DISTINCT parameter in performFind

Alexandre Gomes-8
Thanks David, that's a brilliant idea.

Could you just help me with the syntax? I'm trying the following and it
isn't working:

<set field="entityName"
value="PartyClassificationGroupAndPartyAndPersonAndContactMech"/>
<service service-name="performFind" result-map-name="result">
   <field-map field-name="inputFields" env-name="requestParameters"/>
   <field-map field-name="entityName" env-name="entityName"/>
</service>        

<entity-condition
entity-name="PartyClassificationGroupAndPartyAndPersonAndContactMech"
list-name="partyClassificationGroupAndPartyAndPersonAndContactMechs"
distinct="true">
   <condition-object field-name="result.entityConditionList"/>
<order-by field-name="description"/>
</entity-condition>


Alexandre

On Mon, 2006-01-16 at 18:22 -0700, David E. Jones wrote:

> Use the service to create the find condition and then do the find  
> using an EE call (which you can even do in screen defs or whatever).
>
> -David
>
>
> On Jan 16, 2006, at 5:25 PM, Alexandre Gomes wrote:
>
> > Hi all,
> >
> > Is there a way to do a distinct performFind without changing the  
> > service
> > code?
> > (The reason behind this is that I'm using a view for searching
> > PartyClassifications with certain Parties but I just want the unique
> > PartyClassifications' details to show up in the result).
> >
> > Thank you for your time,
> >
> > Alexandre Gomes
> >
> >
> > _______________________________________________
> > Dev mailing list
> > [hidden email]
> > http://lists.ofbiz.org/mailman/listinfo/dev
>
>  _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - DISTINCT parameter in performFind

David E. Jones

That's about the idea, but you'll want to use the "prepareFind"  
service. There are some examples, just search for prepareFind in the  
xml files in the project.

-David


On Jan 16, 2006, at 6:52 PM, Alexandre Gomes wrote:

> Thanks David, that's a brilliant idea.
>
> Could you just help me with the syntax? I'm trying the following  
> and it
> isn't working:
>
> <set field="entityName"
> value="PartyClassificationGroupAndPartyAndPersonAndContactMech"/>
> <service service-name="performFind" result-map-name="result">
>    <field-map field-name="inputFields" env-name="requestParameters"/>
>    <field-map field-name="entityName" env-name="entityName"/>
> </service>
>
> <entity-condition
> entity-name="PartyClassificationGroupAndPartyAndPersonAndContactMech"
> list-name="partyClassificationGroupAndPartyAndPersonAndContactMechs"
> distinct="true">
>    <condition-object field-name="result.entityConditionList"/>
> <order-by field-name="description"/>
> </entity-condition>
>
>
> Alexandre
>
> On Mon, 2006-01-16 at 18:22 -0700, David E. Jones wrote:
>> Use the service to create the find condition and then do the find
>> using an EE call (which you can even do in screen defs or whatever).
>>
>> -David
>>
>>
>> On Jan 16, 2006, at 5:25 PM, Alexandre Gomes wrote:
>>
>>> Hi all,
>>>
>>> Is there a way to do a distinct performFind without changing the
>>> service
>>> code?
>>> (The reason behind this is that I'm using a view for searching
>>> PartyClassifications with certain Parties but I just want the unique
>>> PartyClassifications' details to show up in the result).
>>>
>>> Thank you for your time,
>>>
>>> Alexandre Gomes
>>>
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [hidden email]
>>> http://lists.ofbiz.org/mailman/listinfo/dev
>>
>>  _______________________________________________
>> Dev mailing list
>> [hidden email]
>> http://lists.ofbiz.org/mailman/listinfo/dev
>
>
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev

smime.p7s (3K) Download Attachment