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

Excluded filters behavior

Answered
Ilaria asked on November 22, 2019

I'm having some trouble understanding the behaviour of exluded/member filters.
If you uncheck some item from a full selected filter than the result is of type 'excluded' but if you open the filter popup again and uncheck one more item, than the filter is 'members'.
It seems to me that a filter is computed as excluded only if you uncheck some items and before that all the items were selected.
It cause me some issue, because I use these filters to update some linked reports.
What's exactly the logic? And is there anyway to control it?
I read the documentation and one post I found on a similar request (When are the following lists populated; members, excluded, and included?) but I did't find the answer.
Thank you!

7 answers

Public
Vera Didenko Vera Didenko Flexmonster November 22, 2019

Hello, Ilaria,

Thank you for writing to us.
 

Here is how the filter works:

1) When the number of deselected fields exceeds the selected ones in the Filter pop-up, then the members property is returned in the Filter Object.
2) When the number of selected fields exceeds the deselected ones in the Filter pop-up, then the exclude property is returned in the Filter Object.
Such an approach saves space and reduces the report object's size.
 

Could you please explain more about what you would like to achieve and how the members/exclude filter properties are being used for your use case?
This will help us to understand the situation better.
 

Looking forward to your reply.
 

Best Regards,
Vera

Public
Ilaria November 25, 2019

Hi Vera,
maybe I'm doing something wrong but it seems to me that this is not the actual behavior.
In the JSFiddle filter on 'Colors'. There are 6 colors
- open filters and uncheck 'blue'. Push on 'GetFilter': filter correctly written as 'excluded'
- open filters again and uncheck 'green'. Push on 'GetFilter': now the filter is written as 'members' (even if there are 2 unchecked out of 6 colors)
- if you instead reset the filters and uncheck at once both 'blue' and 'green', the filter is 'excluded'.
Thank you,
Ilaria

Public
Vera Didenko Vera Didenko Flexmonster November 26, 2019

Hello, Ilaria,
 
Thank you for writing back.
 
After looking further, it seems you are right: filtering by members does work differently.
 
To understand the situation better, our team kindly asks to provide more details on your use case:
1) What would you like to achieve with the returned filter property?
2) Why is it important for your case to know the exact scenarios when the exclude or members property is returned?
 
Waiting for your reply.
 
Best Regards,
Vera

Public
Ilaria November 28, 2019

I have a quite complex situation. I try to simplify:
I have a grid next to the pivot that shows all the values for a certain field. The datasource of this grid is not the same as the pivot datasource, so that I can have more items that the ones in the pivot. In the example of the JSFiddle linked before, I may have a grid with items: 
blue
green
purple
red
white
yellow
black (not in the pivot data source)
orange (not in the pivot data source)
I filter this grid accordingly to the pivot. If the filter is 'members' my query is item in '..member values..', if the filter is 'excluded' my query is item not in '... excluded values...'
For some reason it's important that 'black and 'orange' are visible in the grid. Due to a performance issue I cannot query the pivot datasource to know which items are in both datasource.
I thought that the filter behavior was one you described above and so, I have trained our clients that they will see 'black' and 'orange' in the pivot depending on how many items they select in the pivot, so if they select explicitly 'few items' they will see only them. Otherwise they will see all other items.
Since this is not how it works I have to explain them why the same selection leads to different result. Like in the example:

  1. if I deselect ‘blue’ in the grid I will see green, purple... black and orange (ok)
  2. but if, after that, I deselect also green, I will see only purple, red, ..yellow. Black and orange are not visible because the filter is 'members' (items in 'purple, red, ..yellow') and so I filter only for those items.
  3. if i deselect blue and green at once instead, then black and orange are visible (items not in 'blue, green'). But the selection is indeed the same selection as 2)

The actual behavior also causes me problems on the length of the query because, if there are a lot of items (which is my real case) the property 'members' can have a lot of values.  
I hope this explanation is comprehensive.
Thank you!
Ilaria
 
 

Public
Vera Didenko Vera Didenko Flexmonster November 29, 2019

Hello, Ilaria, 
 
Thank you for providing additional details regarding your case.
 
We would like to confirm that the expected behavior for the filter is the one described earlier: 
1) When the number of deselected fields exceeds the selected ones in the Filter pop-up, then the members property is returned in the Filter Object.
2) When the number of selected fields exceeds the deselected ones in the Filter pop-up, then the exclude property is returned in the Filter Object.
 
Our team is working on restoring this behavior.
The fix will be available in the minor release version with the ETA 30th of December.
 
Please let us know if this would work for you.
 
Best Regards,
Vera

Public
Ilaria November 29, 2019

Thank you!

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster December 31, 2019

Hi Ilaria,
 
We are glad to announce that the expected behavior of the members filter has been restored in the recent update.
 
This is available in the 2.7.22 version of Flexmonster: https://www.flexmonster.com/release-notes/
 
You are welcome to update the component: https://www.flexmonster.com/doc/updating-to-the-latest-version/
 
Please let us know if everything works fine.
 
Looking forward to hearing from you.
 
Best regards,
Mykhailo

Please login or Register to Submit Answer