Is there a possibility to apply a Filter on another Filter in SAPUI5?
I have a HTML5 web application that basically displays year and products that were sold. The data comes from SAP HANA through an OData connection. I have a Tree Selection to display different categories of those products.
Basically in the database I have things like:
2014 | A | 4
2014 | B | 6
A and B being the categories. When initialising my views ( I have lists and VizFrames to visualize data) I use a parameters : {select : 'YEAR, SUMofITEMS'} in the 'data'-part when defining the model. So I get an aggregation and that works fine. On single selection mode of the Tree Selection it works also fine.
The problem is MultiSelect in that Tree :( The filter I apply to my modell basically does this:
(YEAR = 2014) AND (CATEGORY = A OR CATEGORY = B)
My results should be, by my logic, 10 (if you consider the example I gave above). But the Filter thinks otherwise - it picks the exact matches between Category and Year, so I get two results/Objects instead of one. I get that logic, but I don't want it for the MultiSelect Mode.
Is there a way to say you apply first a filter on the category (so it's A OR B), basically already minimizing the model and then apply a year filter to that filtered object in one single request?
I tried applying the filters one after another but that doesn't seem to work. Maybe I am just lacking the logical thinking right now. I hope you guys can help me
Thank you :)