ApplySelControl

Syntax

ApplySelControlResult ApplySelControl(AlgId tAlg, ApplySelControlArg tArg)

Parameters

tAlg. Moniker of indicators calculation algorithm instance or its block instance.

tArg. Operation execution parameters.

Description

The ApplySelControl operation controls dependent dimensions selection.

Comments

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.

Example

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.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ApplySelControl xmlns="http://www.fsight.ru/PP.SOM.Som">
<tAlg xmlns="">
  <id>S1!M!S!C10</id>
  </tAlg>
<tArg xmlns="">
  <stubKey>293668</stubKey>
  <selections />
  </tArg>
  </ApplySelControl>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ApplySelControlResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<selections xmlns="">
<it>
<dimension>
  <k>293670</k>
  <id>FACTS</id>
  <n>Facts</n>
  <vis>1</vis>
<desc ds="" isShortcut="0" isLink="0" ver="1" hf="0">
  <i>FACTS</i>
  <n>Facts</n>
  <k>293670</k>
  <c>1028</c>
  <p>293668</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  </desc>
  </dimension>
  <selectionId>S1!M!S!C11</selectionId>
  <tag />
  </it>
<it>
<dimension>
  <k>293663</k>
  <id>OBJ293663</id>
  <n>Contract types</n>
  <vis>1</vis>
<desc ds="" isShortcut="0" isLink="0" ver="4" hf="0">
  <i>OBJ293663</i>
  <n>Contract types</n>
  <k>293663</k>
  <c>3076</c>
  <p>293662</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  </desc>
  </dimension>
  <selectionId>S1!M!S!C12</selectionId>
  <tag />
  </it>
<it>
<dimension>
  <k>293665</k>
  <id>OBJ293665</id>
  <n>Contracts</n>
  <vis>1</vis>
<desc ds="" isShortcut="0" isLink="0" ver="4" hf="0">
  <i>OBJ293665</i>
  <n>Contracts</n>
  <k>293665</k>
  <c>3076</c>
  <p>293662</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  </desc>
  </dimension>
  <selectionId>S1!M!S!C13</selectionId>
  <tag />
  </it>
  </selections>
<dependencies xmlns="">
<it>
  <ownerDimKey>293663</ownerDimKey>
<ownedDimKeys>
  <l>293665</l>
  </ownedDimKeys>
  </it>
  </dependencies>
  </ApplySelControlResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"ApplySelControl" :
{
"tAlg" :
{
"id" : "S1!M!S!C10"
},
"tArg" :
{
"stubKey" : "293668",
"selections" : ""
}
}
}

JSON response:

{
"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:

Working with Indicators Calculation Algorithm