We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

Exclude

Resolved
Jose Antonio Veintimilla asked on February 3, 2020

Good afternoon.
I am having a problem when implementing Getfilter. Until now I always returned the members object with the key and all its values but now it is returning me in some cases 'exclude'. I need that when updating a filter (check) it is always "members" or failing 'include'.

1 answer

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster February 4, 2020

Hello, Jose,
 
Thank you for your question.
 
We would like to kindly inform you that filters configured through UI will be returned as an array of members or excluded members depending on the quantity of selected members. In case the amount of members selected to be displayed in the report is half of the whole amount of members or less, the members s array will be returned. Otherwise, thegetReportmethod returnsexclude` array.
 
In case the only possible variant for you is to receive an array of members selected to be displayed, 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.
 
Please see an example we have prepared for you demonstrating such an approach. You are welcome to test it by selecting members of the "Color" hierarchy. The results will be printed in your browser's console.
 
We hope it helps.
 
Kind regards,
Illia

Please login or Register to Submit Answer