Representing Filters in XML
Filters are defined as optional filterString elements inside of jdbcTable and jdbcQuery elements. They impose a condition on any results returned for that table, query, or join tree, thereby limiting the number of rows returned when accessing the data source. Whereas other settings mainly determine which columns are available for use in a report. A filter determines which rows are available when running the report.
• | filterString – Expression that evaluates to true or false when applied to each row of values in the data source. The expression refers to columns using their id attribute. Thus, a filter on a table or derived table refers to the simple column name, but a filter on a join tree refers to the table_ID.field_name. The full syntax for the expression is documented in The DomEL Syntax. |
Filters defined in the Domain Designer are limited to conditions on one column or comparisons of two columns, with more complex filters created by the conjunction (logical AND) of several conditions. Other filter expressions are not supported. You can upload a design file with more complex filters, but they are overwritten or cause errors if you open the design in the Domain Designer. |
For example, the following filters are defined in the example Domain on Click the Display tab to specify how your fields should appear to users..
</jdbcQuery><jdbcTable datasourceId="SugarCRMDataSource" id="opportunities" tableName="opportunities"> <fieldList> ... <field id="opportunity_type" type="java.lang.String"/> </fieldList> <filterString>opportunity_type == 'Existing Business'</filterString></jdbcTable><jdbcQuery datasourceId="SugarCRMDataSource" id="p1cases"> <fieldList> ... <field id="status" type="java.lang.String"/> </fieldList> <filterString>status != 'closed'</filterString> <query>...</query></jdbcQuery>[/code] |
Recommended Comments
There are no comments to display.