When are the following lists populated; members, excluded, and included?

Answered
Christopher Phillips asked on July 11, 2019

Using the getReport jsFiddle I noticed that when you apply a filter to a column or row with less than half of the available options selected the filters.members list is populated on getReport. If more than half are selected filters.excluded list is populated with the unselected items. 
 
What is the scenario for filters.included to be populated?

4 answers

Public
Vera Didenko Flexmonster July 12, 2019

Hello, Christopher,
 
Thank you for your question.
 
The include property can be used to specify the field’s members that you would like to be shown together with the results that are returned by query
 
For example, if you have specified a query to return only those cities that begin with the letter “M”, but you would also like to display results for “Toronto”, this can be done the following way:

{
uniqueName: "city",
filter: {
"query": {"begin": "M"},
"include": ["city.[Toronto]"]
}
}

 
Here is a JSFiddle example for illustration.
More information about the filter object can be found in our documentation.
 
Please let us know if this helps.
 
You are welcome to contact us in case further questions arise.
 
Best Regards,
Vera

Public
Christopher Phillips July 12, 2019

I believe I found what I am looking for. After looking at the documentation a little more:
members – not used in conjunction with a query
excludes – used with a query and not with a query
includes – only used with a query
So there are only 2 types of filters a query and not a query. In the UI this correlates to Labels/Values (queries) and using the checkboxes which is not a query. I just wanted to make sure that it was expected behavior that when using the checkboxes in the UI to apply a filter that certain scenarios will populate either excludes or members. Is it accurate to state that these lists will never be populated at the same time?

Public
Tanya Gryshko Flexmonster July 16, 2019

Hello, Christopher,

Thank you for a quick reply.

We would like to confirm that everything you described is correct. Also, certain scenarios will populate either excludes or members, not both.

Please let us know in case of other questions.

Regards,
Tanya

Public
Christopher Phillips July 16, 2019

Thank you Tanya!

Please login or Register to Submit Answer