Need a special offer?Find out if your project fits.
+

Always use filters rather than exclude for pivot filters

Answered
Ian Howland asked on June 15, 2022

Hi,
We have a page with potentially a number of views which may contain a pivot, but could also be other controls and need to be able to pass the filters from one view to the next. The Flexmonster sometimes, depending on the number of filters selected/unselected, uses exclude rather than filter. Also as the data in our system changes when the end of day processing completes we need to have a list of filters to pass to the next view.
Is there a way of forcing the use of filters - alternatively can I get an event when a filter is changed and then work out the filters from the exclude list. I am looking at filteropen and filterclose at the moment, just wondering if this is a good solution.
Many thanks,
Ian

3 answers

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster June 16, 2022

Hello, Ian,

Thank you for reaching out to us.

We recommend using an approach based on getting all members of the hierarchy with the getMembers method and finding the difference or union between them and the received filter. Kindly check the following JSFiddle for reference: https://jsfiddle.net/flexmonster/hsfyt3az/ 

Please let us know if such an approach would work for your case. Feel free to contact us if other questions arise.

Kind regards,
Nadia

Public
Ian Howland June 20, 2022

Thank you, that seems similar to the approach I had come up with.
Does this exclude filter functionality happen if the data is coming from an OLAP source?

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster June 21, 2022

Hello,

Thank you for the response.

Yes, this behavior of exclude / filter works the same with all the data sources, including OLAP. If you decide to use the approach with getMembers API call, please note that this method is async for the OLAP data source. More information you can find in our documentation: https://www.flexmonster.com/api/getmembers/

You are welcome to write to us in case further questions arise.

Kind regards,
Nadia

Please login or Register to Submit Answer