IncludeParents: Boolean;
The IncludeParents property determines including of the parent elements to filtering result.
Property value is set from JSON. Property value is returned by the getIncludeParents() method.
To execute the example, the HTML page must contain the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component). A calendar dimension tab must be selected on the side panel, set text filter for dimension:
// Get side panel PropBar = expressBox.getPropertyBarView(); // Get side panel control Control = PropBar.getControl(); // Get side panel tab Panel = Control.getActiveItem(); // Get view of dimension element tree TreeV = Panel.getDimTreeView(); // Set filter by the NAME attribute TreeV.setTextFilter("2000", ["NAME"], True, True); // Get dimension filter Filter = TreeV.getCurrentFilter(); // Get and output to the console different filter parameters console.debug("Filtering parameters:\nInclude parents: " + Filter.getIncludeParents() + "\nInclude parents and neighbors: " + Filter.getIncludeParentsWithSiblings() + "\nSearch by identifiers: " + Filter.getTextAttributes() + "\nMatch case: " + Filter.getTextCaseSensitive() + "\nFiltering by string: " + Filter.getTextValue() + "\nSearch by whole words: " + Filter.getTextWholeWordsOnly() ); // Get a handler of JSON generation Filter.getMbJSONDelegate(); // Generate filtering parameters as a JSON object console.debug(JSON.stringify(Filter.getFilterJSON(), null, 2)); // Get and set hash string of filtering parameters cHash = Filter.getHash(); Filter.setCustomHash(cHash); // Check if custom hash was set console.debug(Filter.isCustomHash() ? "Custom hash is set" : "Hash is calculated from parameters");
After executing the example dimension filter is set, the console displays various filtering parameters.
See also: