DimSelectionSet Constructor

Syntax

DimSelectionSet(settings);

Parameters

settings. JSON object that contains values of class properties.

Description

The DimSelectionSet constructor creates an instance of the DimSelectionSet class.

Example

To execute the example, the HTML page must contain the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component). Create a dimensions collection, that represents a metabase object, next show keys and names for dimensions in this collection:

// Get express report data source
var source = expressBox.getSource();
// Create a model of metabase object containing collection of dimensions
var dimSelSet = new PP.Mb.DimSelectionSet({
    OdId: source.getDimFilterOdId(), // Moniker
    CorrelatedDims: source.getDims() // Array of dimensions
});
console.log("Moniker of collection of dimensions: ");
console.log(dimSelSet.getOdId().id);
// Get collection of express report dimensions
var items = dimSelSet.getItems();
// Get names of express report dimensions and their keys
console.log("Keys and names of collection dimensions:")
for (var i in items) {
    var dimSelection = items[i];
    var key = dimSelection.getDimension().getKey();
    var name = dimSelection.getDimension().getName();
    console.log(key + ": " + name);
};

After executing the example the browser console shows moniker of the created dimensions collection in metabase, and also keys and names of dimensions in this collection:

Moniker of dimensions collection:
BDFHJLNLMAADEOAEFCMHJIOJMALPMMFENLGOCBGPEIDMPBEG!M!S!EAGMCJPFMMAADEOAEPPAKJFAMMFHDBKMEBIFIPGJNHANEFOBC!filterSel
Keys and names of dimensions in the collection:
98: Facts
103: Data types
104: Socio-Economic indicators
105: Territories
106: Calendar

See also:

DimSelectionSet