🍉 Meet Flexmonster Pivot Table & Charts 2.9.Check out all hot features!
Get Free Trial

How to get Dynamic filters[Custom API]

Answered
Cedric Kalume asked on November 24, 2020

Hello,
 
When Using the custom API is it possible to effectuate the /members request only when the member is about to be filtered?
 
I have a situation where the members request returns 100000+ values but after the pivot as been constructed only 10 value remain for that column. the best would be that the /members request would be effectuated when the user open the filter windows and not before
 
thanks

11 answers

Public
Milena Pechura Milena Pechura Flexmonster November 26, 2020

Hello, Cedric,
 
Thank you for your question.
 
We would like to explain the logic of sending the requests in more detail. In our component, the /select request is performed after all members are uploaded. This means that the /members request must be sent before /select.
 
Do not hesitate to contact us if any other questions arise. We will be glad to help you.
 
Best regards,
Milena

Public
Cedric Kalume November 26, 2020

Hello Milena,
 
Thank you for answering.
 
Is there any way to hide members from the filter windows after the /select request has been effectuated?
 
Awaiting your answer

Public
Milena Pechura Milena Pechura Flexmonster November 27, 2020

Hi, Cedric,
 
Thank you for your question.
 
To hide all members shown in the filter pop-up, we suggest specifying members: false in the filters object of the /fields request. Please kindly note that there is no configuration to hide specific members.
 
In case it is needed to display only some of the members in the filter window, the only possible solution we see now is to create a custom filter pop-up and show only specific members depending on your custom logic. But you will need to hide the default filter and implement a custom one using Flexmonster API for that.
 
Please let us know if it helps.
 
Kind regards,
Milena

Public
Cedric Kalume December 1, 2020

Hello Milena,
 
I Think  dynamic filters are a must have for any kind of datatable / pivot tool and would kindly like to request for your team to work on an implementation.
Unfortunately the solution you have given to me is very impractical at the moment because:

  • the custom API is very closed and i have found no way to alter data sent during request ( which would allow me to implement a custom /members request)
  • I have not found a way to trigger a specific custom api request (which would allow me to call my custom /members in filteropen for example.
  • the custom api seems to disable most js methods which means that i cannot get the list of members NOR can I get the list of displayed members from the flexmonster instance

If you can help me solve either the first two or the last point I put above then I would be able to implement a custom dynamic filter option while (hopefully) waiting for an official version

Public
Milena Pechura Milena Pechura Flexmonster December 4, 2020

Hello, Cedric,
 
Thank you for sharing your suggestions on Flexmonster functionality and for giving an update on your progress.

Our team is currently working on your case.
We will make sure to reach out to you shortly.

Best regards,
Milena

Public
Milena Pechura Milena Pechura Flexmonster December 7, 2020

Hi, Cedric,
 
We have carefully checked all points that you specified.
 
Our team would like to provide an example showing the recommended approach to create a custom filter pop-up. 
Please see https://jsfiddle.net/flexmonster/356rsy8o/.
In the example, we hid the Flexmonster filter pop-up and created a custom one. Then we added an Apply button with the setFilter on click to the pop-up.
 
To show only the members displayed on the grid in your filter window, you need to implement the custom logic to retrieve such members. It can be done by adding a new endpoint on your server.
Then, you can send the new request (not the request that Flexmonster sends) to the server when opening the pop-up.
In the request, send the hierarchy name and the slice, and return the members of the hierarchy that you want to show for the current slice.
 
Please kindly note that the example above is created to demonstrate the main idea.
You are welcome to customize it to your needs.
 
Also, could you please let us know if the suggested approach helps?
Waiting for your reply.
 
Kind regards,
Milena

Public
Milena Pechura Milena Pechura Flexmonster December 15, 2020

Hello, Cedric,
 
Hope you are doing well!
 
We were wondering whether our response helped.
Could you please let us know if the suggested approach works for you?
 
Waiting for your reply.
 
Best regards,
Milena

Public
Cedric Kalume December 16, 2020

Hello Milena,
I’m very well thank you.
I’ll be working on this in early January, I’ll let you know if it fixes my issues. 
 
Regards,
Kalume Cedric

Public
Milena Pechura Milena Pechura Flexmonster January 21, 2021

Hello, Cedric,
 
How are you?
 
Our team would like to kindly take an interest in whether you successfully created the custom filter pop-up.
Please let us know if everything works fine or if any additional questions arise.
 
Kind regards,
Milena

Public
Cedric Kalume January 26, 2021

Hello Milena,
 
The solution you have provided is functional, however we didn’t have access to the prebuilt filters. I had to put my custom filter inside the default one and replace the apply button. 
This will have to do for now  but I would still prefer to see an official and more robust implementation is there any possibility to see it implemented this year?
 
Regards,
Kalume Cedric

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster January 27, 2021

Hello,
 
Thank you for your feedback.
 
Our team is happy to hear this approach works for you now.
 
Concerning the built-in implementation of the dynamic filtering:
Our team agrees it would be useful to have this feature available. However, our roadmap is full at the moment. Therefore, we are not ready to provide you with any ETA on this point.
 
Feel free to reach out in case other questions arise.
 
Kind regards,
Illia

Please login or Register to Submit Answer