❄️✨Ho-ho-holiday offer for new projects! Check out our pricing page.

Implement filters using Custom Datasource API

Answered
Ricardo Henrique Moreira asked on October 31, 2025

We are developing an application using the Flexmonster component fetching the data from a Custom Datasource (Oracle Database, Apex and Ajax).

In the data mapping we have YEAR as parent of QRTR (quarter) which is then parent of MNTH (month).

We also have DVSN (division) as parent of PGRP (product group) which is parent of DEPT (department) which is parent of CLSS (class) which is also of SCLS (subclass).

We also have COMP (company) as parent of CHAN (chain) which is parent of CHNL (channel).

The Flexmonster component works correctly when we set filters using those fields but if we set the hierarchy level of any axis to a level lower than the second level if any filtering is active the report is no longer shown in Flexmonster.

For instance. We create a filtering that returns only rows with PGRP equal to '2'.

If the hierarchy level set in the calendar axis is YEAR or QRTR (first and second level) the component works fine.  If we set it the MNTH (which is the third level) the data is no longer rendered in Flexmonster.

The same happens with other hierarchies (the filtered component is irrelevant: it can be part of the hierarchy or any of the measures).

If the hierarchy level set in the product axis is DVSN or PGRP with an active filter the component works fine.  If we change it to DEPT, CLSS or SCLS the data is no longer rendered in Flexmonster.

 

We change the level of the hierarchy in one of the axis setting the levelName and executing the runQuery(slice) on Flexmonster. If any axis has the level below the second the data is not shown after the query is executed.

If in this situation (no data shown) if you set the level of the hierarchy to the first or second level the data is then shown again, BUT clearing all filters does not make the Flexmonster work normally again.  Once you "see" this empty report once you will only be able to see data using the hierarchy set up to the second level even after you clear all the filters.  Of course, recreating the Flexmonster (new instance) reset its operation to normal again.

We have included a Word document with every request/reply that happens before this empty report is shown.

If you need any clarification, please contact us.

1 answer

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster November 3, 2025

Hello, Ricardo!

Thank you for reaching out to us.

Our team cannot reproduce the described behavior on our side. Please, modify the following JSFiddle to make the case reproducible: https://jsfiddle.net/flexmonster/rb8yu3jk/.
In this JSFiddle, we use the pivotEndpoint function to mock responses for all server requests. The sample data we used for testing can be found at the bottom of the JSFiddle.

Looking forward to hearing from you.

Kind regards,
Solomiia

Please sign in or register to submit your answer