OnlySelected: Boolean;
The OnlySelected property determines filtering of only selected dimension elements.
Property value is set from JSON. It is returned with the getOnlySelected() method.
To execute the example, the HTML page must contain the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component). The dimension tab must be selected and value must be set in the search bar in the side panel. Get dimension filtering parameters:
// Get side panel PropBar = expressBox.getPropertyBarView(); // Get side panel control Control = PropBar.getControl(); // Get side panel tab Panel = Control.getActiveItem(); // Get dimension element tree view TreeV = Panel.getDimTreeView(); // Get filter instance Filter = TreeV.getCurrentFilter();
// Output filtering parameters to the console
console.debug("Filter by text: " + Filter.getTextValue());
console.debug("Filter only selected elements: " + Filter.getOnlySelected());
console.debug("Filter only elements with data: " + Filter.getOnlyWithData());
console.debug("Sorting parameters: " + JSON.stringify(c2.getOrderBy()));
console.debug("Sorting parameters in JSON format: ");
console.debug(JSON.stringify(c2.getOrderByJSON(), null, 2));
After executing the example the console displays sorting parameters:
Filter by text: 200
Filter only selected elements: False
Filter only elements with data: False
Sorting parameters: [{"NAME":"Desc"}]
Sorting parameters in JSON format:
{
"its": {
"it": [
{
"att": {
"id": "NAME"
},
"asc": false
}
]
}
}
See also: