Filter by selection allows choosing specific field members to display.
Learn more about the filter by selection:
The filter by selection can be used to:
The filter by selection is available for all data sources.
Note For the custom data source API, the filter by selection must be implemented on your server. For more details, refer to the Implementing filters guide.
The filter by selection can be:
Selection filter can be applied via UI in the following ways:
Step 1. Open the filter view by clicking the field’s name or using the field’s context menu.
Step 2. Use the checkboxes to select field members that should be displayed or hidden.
You can also filter members using the search box. For more details, refer to the Useful tips guide.
The screenshot below shows an example of a filter configuration:
Step 3. Once the filter is configured, click the APPLY button to save your configuration.
Open a field member’s context menu and choose one of the following options:
If you want to preset a filter in your report, we recommend the following approach:
If needed, you can edit the filter configuration programmatically. To learn more, see the FilterObject.
If the filter by selection contains only non-existent members, it is ignored and all the field members are displayed. To change this behavior and show an empty grid, see the Useful tips guide.
To set or change the filter at runtime, use the setFilter() API call:
flexmonster.setFilter("Country", { members: [ "country.[poland]", "country.[uk]", "country.[ukraine]", ], });
You can view the existing filter configuration using the getFilter() method.
Try a live sample on JSFiddle.
If the filter by selection contains only non-existent members, it is ignored and all the field members are displayed. To change this behavior and show an empty grid, see the Useful tips guide.
Note Filter by selection is ignored for fields with only one member.
Learn how to clear the filter by selection:
Step 1. Open the filter view by clicking the field’s name or using the field’s context menu.
Step 2. Select the Select all checkbox to choose all members:
Step 3. Click the APPLY button to save your changes.
You can clear all filters from a field using the clearFilter() API call. For example:
flexmonster.clearFilter("Country");
Try a live sample on JSFiddle.