Test the filter condition in the native data source to verify that it is correct. Then test the filter condition in the native data source.
It is important that the native filters are supported by the REST data source, otherwise the entire data is fetched from the report and will not be filtered. It is important that the data source supports filtering, sorting and selective support of properties. Native filters gives you the ability to request from the data source. The resultant data is filtered and refined. You do not have to do anything on the client.
With the previous releases of IBM Rational Publishing Engine, you could define filters that were static, you had to know them when you designed the template and you could not change them at runtime.
Rational Clearquest
A sample variable: filter: cq:Product{cq:Product="${productName}")
productName: Rational Publishing Engine
A resolved filter: cq:Product{cq:Product="Rational Publishing Engine")
Rational DOORS
The following Rational DOORS native filter example filters object that contains the word "shall" in the Object Text attribute.IBM Rational Tau
The following IBM Rational Tau native filter example filters packages that contains predefined names.
Schema element, model.predefinedPackage represents the current schema element.
Underlying Tau query, GetEntities(“predefinedPackage”).select(IsKindOf(“Package”) represents the query.
Native filter, select(HasPropertyWithValue("Name", "Predefined")) represents the native filter condition.
The query executed by Tau query evaluator is:
GetEntities(“predefinedPackage”). select(IsKindOf(“Package”)) select(HasPropertyWithValue("Name", "Predefined"))
Rational Requisite Pro
The following REST native filter example extracts the Requisite Pro PRRequirements using Stability='High'. In this case, a filter expression has been added to the node below Appliances, selecting only the appliances manufactured by a specific manufacturer.
fields=Project/Requirements/PRRequirement[Stability = 'High']/(Stability|FullTag|Priority|Status)
Example 2
Lets look at the following IBM Rational DOORS example of using Native filters in templates and how to create such a filter.
If for example, you want to filter only those objects that contain the word abc in the Object Text attribute.