GetCalculatedCubeFormulas

Syntax

GetCalculatedCubeFormulasRes GetCalculatedCubeFormulas(CubeId tCube, GetCalculatedCubeFormulasArg tArg)

Parameters

tCube. Opened calculated cube instance moniker.

tArg. Operation execution parameters.

Description

The GetCalculatedCubeFormulas operation gets formulas for calculated cube.

Comments

To execute the operation, in the tCube field specify calculated cube instance moniker, and in the tArg field specify parameters of getting formulas list. Get calculated cube instance moniker using the OpenCube operation.

In the tArg.its field it is required to create an element where in the dimIds field set up change monikers creating cube coordinate. Dimensions that are not fixed in cube and participating in coordinates creation, by which formulas are set, are specified here. The list of dimensions can be obtained using the GetCube operation or on opening cube using the OpenCube operation, if corresponding template is selected. Next, it is required to open all dimensions using the OpenDim operation and create a selection using the ChangeDimSelection operation. The obtained selection will determine cube coordinate that will be used to get formulas.

The operation results in formula by the specified coordinate or collection of formulas, if management of formulas actual periods is set up in the cube.

Example

Below is the example of getting information about formulas set for the specified calculated cube coordinate. The request contains cube instance moniker and monikers of dimensions creating cube coordinate. Selection is pre-configured by dimensions. The response contains the obtained information about formulas.

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">
<GetCalculatedCubeFormulas xmlns="http://www.fsight.ru/PP.SOM.Som">
<tCube xmlns="">
  <id>S1!M!S!C1</id>
  </tCube>
<tArg xmlns="">
<its>
<it>
<dimIds>
<its>
<it>
<dimId>
  <id>S1!M!S!S2</id>
  </dimId>
  </it>
<it>
<dimId>
  <id>S1!M!S!S3</id>
  </dimId>
  </it>
<it>
<dimId>
  <id>S1!M!S!S4</id>
  </dimId>
  </it>
  </its>
  </dimIds>
  </it>
  </its>
  </tArg>
  </GetCalculatedCubeFormulas>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetCalculatedCubeFormulasResult 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">
<its xmlns="">
<it>
<formulas>
<formula>
<its>
<it>
  <index>0</index>
  <dateBegin>1899-12-30T00:00:00.000</dateBegin>
  <dateEnd>1899-12-30T00:00:00.000</dateEnd>
  <expression>(Indicator 1 | Provider 2 | 2000 + Indicator 1 | Provider 2 | 2001) / 2</expression>
  <expressionMoniker>S1!M!S!C1!292839.0|292841.0|112.14!Exp0</expressionMoniker>
  </it>
  </its>
  </formula>
  <modified>0</modified>
  </formulas>
  </it>
  </its>
  </GetCalculatedCubeFormulasResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetCalculatedCubeFormulas" :
{
"tCube" :
{
"id" : "S1!M!S!C1"
},
"tArg" :
{
"its" :
{
"it" :
[
{
"dimIds" :
{
"its" :
{
"it" :
[
{
"dimId" :
{
"id" : "S1!M!S!S2"
}
},
{
"dimId" :
{
"id" : "S1!M!S!S3"
}
},
{
"dimId" :
{
"id" : "S1!M!S!S4"
}
}
]
}
}
}
]
}
}
}
}

JSON response:

{
"GetCalculatedCubeFormulasResult" :
{
"its" :
{
"it" :
[
{
"formulas" :
{
"formula" :
{
"its" :
{
"it" :
[
{
"index" : "0",
"dateBegin" : "1899-12-30T00:00:00.000",
"dateEnd" : "1899-12-30T00:00:00.000",
"expression" : "(Indicator 1 | Provider 2 | 2000 + Indicator 1 | Provider 2 | 2001) \/ 2",
"expressionMoniker" : "S1!M!S!C1!292839.0|292841.0|112.14!Exp0"
}
]
}
},
"modified" : "0"
}
}
]
}
}
}
public static GetCalculatedCubeFormulasRes GetCalcCubeFormulas(CubeId moniker, OpenId[] dimMonikers)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tGet = new GetCalculatedCubeFormulas()
{
tArg = new GetCalculatedCubeFormulasArg()
{
its = new GetCalculatedCubeCoordFormula[]
{
new GetCalculatedCubeCoordFormula()
{
dimIds = new OpenIds()
{
its = dimMonikers
}
}
}
},
tCube = moniker
};
//Get calculated cube formulas
var result = somClient.GetCalculatedCubeFormulas(tGet);
return result;
}

See also:

Working with Cubes