Hello gurus,

I have this view-entity which I use to see how many times a
"centroEnsayo" is referenced in "SeguimientoCentro"

  <view-entity entity-name="ParticipacionCentros"
package-name="org.ofbiz.bdmetrics">
    <member-entity entity-alias="SG"
entity-name="SeguimientoCentro"></member-entity>
    <alias name="centro" group-by="true" field="centroEnsayo"
entity-alias="SG"></alias>
    <!-- count-distinct just in case -->
    <alias name="participacion" function="count-distinct"
field="idSeguimientoCentro" entity-alias="SG"></alias>
  </view-entity>

I have to get the 30 most active "centroEnsayo" (those which
participacion is higher), so I should order the query so the most active
is first.

I am using minilang and I tried:

       <entity-condition list-name="listaCentros"
entity-name="ParticipacionCentros">
           <select-field field-name="centro"/>
           <select-field field-name="participacion"/>
           <order-by field-name="participacion"/>
           <limit-range size="30" start="1"/>
       </entity-condition>

but of course, this just orders the list so the less active is first.

Any ideas?

Thanks,
-- 
------------------------------------------------------------------------
Soluciones de Gestión para su empresa
eBusiness, ERP, CRM
------------------------------------------------------------------------
*Daniel Martínez Martínez*
* *
Director de Proyectos
C/ Julia García Boután, 29  D 3ºB
28022 Madrid
España  * *
        E-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
Web: *www.paradisosistemas.es <http://www.paradisosistemas.es>
*Comercial: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Tel: 678416758


Reply via email to