ApplySelControlResult ApplySelControl(AlgId tAlg, ApplySelControlArg tArg)
tAlg. Moniker of indicators calculation algorithm instance or its block instance.
tArg. Operation execution parameters.
The ApplySelControl operation controls dependent dimensions selection.
The operation gets a list of data provider and data consumer dimensions, and also get rebuilt dependent dimensions on sending some dimension's selection. To execute the operation, in the tAlg field specify calculation algorithm moniker or its block moniker, and in the tArg field specify operation execution parameters. The moniker can be obtained on executing the OpenAlg operation.
If an empty collection is sent in the tArg.selections field, the response contains the list of dimensions selections.
If a selection is sent in the tArg.selections field, the response contains reopened controlled dimensions taking into account the sent selection.
Below is the example of getting a list of dimensions of the source cube used in calculation algorithm. The request contains calculation algorithm moniker and cube key. The response contains general information about dimensions and also whether there are controlled and controlling dimensions.
{
"ApplySelControl" :
{
"tAlg" :
{
"id" : "S1!M!S!C10"
},
"tArg" :
{
"stubKey" : "293668",
"selections" : ""
}
}
}
{
"ApplySelControlResult" :
{
"selections" :
{
"it" :
[
{
"dimension" :
{
"k" : "293670",
"id" : "FACTS",
"n" : "Facts",
"vis" : "1",
"desc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "1",
"@hf" : "0",
"i" : "FACTS",
"n" : "Facts",
"k" : "293670",
"c" : "1028",
"p" : "293668",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0"
}
},
"selectionId" : "S1!M!S!C11",
"tag" : ""
},
{
"dimension" :
{
"k" : "293663",
"id" : "OBJ293663",
"n" : "Contract types",
"vis" : "1",
"desc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "4",
"@hf" : "0",
"i" : "OBJ293663",
"n" : "Contract types",
"k" : "293663",
"c" : "3076",
"p" : "293662",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0"
}
},
"selectionId" : "S1!M!S!C12",
"tag" : ""
},
{
"dimension" :
{
"k" : "293665",
"id" : "OBJ293665",
"n" : "Contracts",
"vis" : "1",
"desc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "4",
"@hf" : "0",
"i" : "OBJ293665",
"n" : "Contracts",
"k" : "293665",
"c" : "3076",
"p" : "293662",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0"
}
},
"selectionId" : "S1!M!S!C13",
"tag" : ""
}
]
},
"dependencies" :
{
"it" :
{
"ownerDimKey" : "293663",
"ownedDimKeys" :
{
"l" : "293665"
}
}
}
}
}
public static ApplySelControlResult GetApplySelDims(string moniker, uint key)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tApply = new ApplySelControl()
{
tAlg = new AlgId() { id = moniker },
tArg = new ApplySelControlArg()
{
stubKey = key,
selections = new AlgDimSelection[0]
}
};
//Get dimensions list
var result = somClient.ApplySelControl(tApply);
return result;
}
See also: