Advanced Filter
From JRapid
(Redirected from Advanced (value of mode))
Contents |
Description
The advanced mode of a filter allows the use of restrictions to define searching criteria. Restrictions use HQL expressions.
- type: the type of the property on which a restriction we will added.
- expr: an HQL expression that performs the filtering.
- param: params for the expression which can be the name of the filter to map the user input.
Use the "me" variable to reference the entity where you are creating the filter.
Usage
<filter
display = DISPLAY
label = LABEL
name = NAME
type = TYPE >
<restriction expr = HQL>
<param value = VALUE />
</restriction>
</filter>
Example
- Advanced filtering example.
<entity label="Opportunity" menu="Opportunities" name="Opportunity">
...
<filter display="primary" label="Contact" name="contactFilter">
<restriction expr="me.company in (select company from Company as company where ? in
(select contact.surname from Contact as contact where contact.company=me.company))">
<param value="contactFilter"/>
</restriction>
</filter>
...
</entity>
